digital-fabric / extralite

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

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

Open noteflakes opened 5 months ago

noteflakes commented 5 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"