digital-fabric / extralite

Ruby on SQLite
http://www.rubydoc.info/gems/extralite
MIT License
253 stars 8 forks source link

Add `Query#<<` as alias to `Query#batch_execute` #49

Closed noteflakes closed 10 months ago

noteflakes commented 10 months ago

See #47. This will allow the following syntax:

q = db.prepare('insert into foo (?, ?, ?)')
data = get_data
# insert in batches of 100
data.each_slice(100) { |slice| q << slice }