Open essenciary opened 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")
Yes - but the point is to have a common API for bulk inserts.
For backends that support it. Similar to, for MySQL:
LOAD DATA INFILE
INSERT INTO
):INSERT INTO class_result VALUES (1,’John’,’A’),(2,’Elsa’,’D’),(3,’Sophia’,’B’),(4,’Paul’,’B’),(5,’Saira’,’A’)