Re: [sqlite] Loading a database from memory

2011-07-19 Thread Glenn McCord
e http://code.google.com/p/sphivedb/ seems to imply GPL v2, unless that is only referring to sphivedb. Thanks. > > > > -- Original -- > From:  "Simon Slavin"; > Date:  Tue, Jul 19, 2011 10:10 PM > To:  "General Discussion of SQL

Re: [sqlite] Loading a database from memory

2011-07-19 Thread st@gz
ubject: Re: [sqlite] Loading a database from memory On 19 Jul 2011, at 3:04pm, Pavel Ivanov wrote: >> So you can copy any block of memory you have a handle for into that, use >> SQLite to manipulate the data while it's in memory > > Simon, could you elaborate what you

Re: [sqlite] Loading a database from memory

2011-07-19 Thread Simon Slavin
On 19 Jul 2011, at 3:04pm, Pavel Ivanov wrote: >> So you can copy any block of memory you have a handle for into that, use >> SQLite to manipulate the data while it's in memory > > Simon, could you elaborate what you meant by that. To my knowledge you > can't just copy any block of memory into

Re: [sqlite] Loading a database from memory

2011-07-19 Thread Pavel Ivanov
> So you can copy any block of memory you have a handle for into that, use > SQLite to manipulate the data while it's in memory Simon, could you elaborate what you meant by that. To my knowledge you can't just copy any block of memory into SQLite and make it treat this memory block as database. D

Re: [sqlite] Loading a database from memory

2011-07-19 Thread Simon Slavin
On 19 Jul 2011, at 5:55am, Glenn McCord wrote: > I've just had a quick look at the backup API, and it seems to make use > of filenames and sqlite databases, which is not exactly what I'm > after. SQLite has a pseudo-filename of ':memory:' which refers to a database kept entirely in memory. So

Re: [sqlite] Loading a database from memory

2011-07-19 Thread Pavel Ivanov
> I'm starting to get the impression that the only way for me to do this > is to make my own vfs layer... > http://stackoverflow.com/questions/3839158/using-sqlite-with-stdiostream Yes, this is the best way you can do it. Other option is to take that data, save it to some temporary file and then o

Re: [sqlite] Loading a database from memory

2011-07-19 Thread Giuseppe Luciano
> What I need is the ability to read in an array of bytes, (read from > meta data of an mpeg4, say, via fstream or some other equivalent), > that represents the raw data of an sqlite database. > > I'm trying to avoid having to parse in that data, save it to a > separate file first, then load it u

Re: [sqlite] Loading a database from memory

2011-07-18 Thread Glenn McCord
On Tue, Jul 19, 2011 at 4:39 PM, Glenn McCord wrote: > On Tue, Jul 19, 2011 at 4:31 PM, Simon Slavin wrote: >> >> On 19 Jul 2011, at 5:17am, Glenn McCord wrote: >> >>> Hi. I've been trying to find out the best way of loading an sqlite >>> database from memory. Basically I'd like to be able to sav

Re: [sqlite] Loading a database from memory

2011-07-18 Thread Glenn McCord
On Tue, Jul 19, 2011 at 4:31 PM, Simon Slavin wrote: > > On 19 Jul 2011, at 5:17am, Glenn McCord wrote: > >> Hi. I've been trying to find out the best way of loading an sqlite >> database from memory. Basically I'd like to be able to save a small >> sqlite database as meta data to an audio file, i

Re: [sqlite] Loading a database from memory

2011-07-18 Thread Simon Slavin
On 19 Jul 2011, at 5:17am, Glenn McCord wrote: > Hi. I've been trying to find out the best way of loading an sqlite > database from memory. Basically I'd like to be able to save a small > sqlite database as meta data to an audio file, i.e. an mpeg4 > container. I'd then be able read, modify then