[odb-users] Streaming BLOBs
philly.dilly at gmail.com
philly.dilly at gmail.com
Thu Jun 7 09:47:51 EDT 2012
Hi Boris,
The use case I had in mind was for backing up user provided documents of
unknown size which could get as big as several hundred megabytes. I know
this is an edge case scenario since a database (specially a light weight
one like sqlite) isn't really the place to save such big documents!
On , Boris Kolpackov <boris at codesynthesis.com> wrote:
> Hi Philippe,
> Philippe Cadieux-Pelletier philly.dilly at gmail.com> writes:
> > Are there any plans to add support to stream blobs, let's say by binding
> > std::istream to blobs?
> If this is for a member of a persistent class, then you would need a
> bi-directional stream (ie, std::iostream), since it will have to
> support both reading (for persist, update, etc.) and writing (for
> load, query, etc).
> There are only two cases where you may want to use a unidirectional
> stream: in query parameters (std::istream) and in views (std::ostream).
> However, I am still having a hard time coming up with a realistic use
> case for this. Can you provide a bit more details on what you are trying
> to achieve?
> Also note that currently ODB doesn't use the SQLite BLOB streaming
> mechanism (ie, sqlite3_blob_open() & friends[1]) for BLOB reading/
> writing. We may support this in the future (as we do for some other
> databases, eg, Oracle and MS SQL), though there are some tricky
> limitations of this mechanism in SQLite that we still need to think
> about.
> [1] http://www.sqlite.org/c3ref/blob_open.html
> Boris
More information about the odb-users
mailing list