GenieFramework / SearchLight.jl

ORM layer for Genie.jl, the highly productive Julia web framework
https://genieframework.com
MIT License
139 stars 16 forks source link

Add API for bulk inserts #54

Open essenciary opened 2 years ago

essenciary commented 2 years ago

For backends that support it. Similar to, for MySQL:

honghuzi commented 2 years ago

In the case of inserting a DataFrame to the SQLite database, it might be a good idea to use SQLite.jl package

  cols = [] # cols for the model definition
  db = SQLite.DB("db/temp.sqlite")
  n = count(MyModel)
  df = df[!, cols]
  df |> SQLite.load!(db, "temp")
essenciary commented 1 year ago

Yes - but the point is to have a common API for bulk inserts.