digital-fabric / extralite

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

Add support for opening a BLOB for incremental I/O #60

Open noteflakes opened 10 months ago

noteflakes commented 10 months ago

The idea is to have a file like API (https://www.sqlite.org/c3ref/blob_open.html):

blob = db.open_blob(db_name, tbl_name, column_name, rowid)
blob.size #=> returns total blob size
blob.offset #=> 0
blob.read(12) #=> "blahblahblah"