sqlite3-ruby
sqlite3-ruby copied to clipboard
execute_batch returns the result of the last statement
Currently execute_batch
always return nil
.
- Would it be better to return the result of the last statement instead?
- Would it make sense to accept a list of statements as well? For example:
db.execute_batch [
"PRAGMA empty_result_callbacks=1",
"CREATE TABLE t1(a,b)",
"CREATE INDEX t1i3 ON t1(a,b)",
"INSERT INTO t1 VALUES(1, 2)",
"SELECT * FROM t1",
]
or simply db.execute [...]
?
Yes, I think both of those things would be fine.