Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

present a file-like interface to blobs #101

Closed
glyph opened this issue Apr 20, 2016 · 4 comments
Closed

present a file-like interface to blobs #101

glyph opened this issue Apr 20, 2016 · 4 comments

Comments

@glyph
Copy link

glyph commented Apr 20, 2016

http://www.sqlite.org/c3ref/blob_open.html and http://www.sqlite.org/c3ref/blob_write.html allow users to incrementally write large objects, which can (at least in principle) allow for smaller memory footprint when processing large blob storage requests. Given that sqlite supports 64-bit blobs, i.e. larger than would fit in memory, this is necessary to be able to access all of its functionality.

@glyph glyph changed the title make blobs file-like present a file-like interface to blobs Apr 20, 2016
@rogerbinns
Copy link

@glyph your 64 bit portion is not correct. The default maximum blob size is 1GB. The maximum you can make it by raising limits is a few bytes shy of 2GB. This applies to 32 and 64 bit versions of SQLite and is from the file format.

Blobs also have several restrictions. For example you cannot change their length with the blob I/O interface. (You can use zeroblob to create one of the right size, and then overwrite portions of that.) I recommend having a look at the APSW doc to get an idea of a file like API will look like, and the various quirks: https://rogerbinns.github.io/apsw/blob.html#blob-class

@glyph
Copy link
Author

glyph commented Apr 20, 2016

@rogerbinns thanks for all that information. I suppose the interface here is just for limiting memory usage during a bulk load of a large file, not actually for doing things like having a log file that can be appended to inside the database. Still, it's useful to have :)

@palaviv
Copy link

palaviv commented Apr 20, 2016

hi @glyph you may want to look at pull request #93.

@ghaering
Copy link
Owner

ghaering commented Aug 7, 2018

This project is feature complete and in maintenance-only mode, nothing new will be implemented here. Closing.

@ghaering ghaering closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants