Re: [sqlite] Loading a database from memory

2011-07-19 Thread Glenn McCord
19, 2011 10:10 PM > To:  "General Discussion of SQLite Database"<sqlite-users@sqlite.org>; > > Subject:  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 yo

Re: [sqlite] Loading a database from memory

2011-07-19 Thread st@gz
on of SQLite Database"<sqlite-users@sqlite.org>; Subject: 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

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.

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
On Tue, Jul 19, 2011 at 12:17 AM, Glenn McCord <glenn.mcc...@gmail.com> 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 >

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

Re: [sqlite] Loading a database from memory

2011-07-18 Thread Glenn McCord
On Tue, Jul 19, 2011 at 4:39 PM, Glenn McCord <glenn.mcc...@gmail.com> wrote: > On Tue, Jul 19, 2011 at 4:31 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 19 Jul 2011, at 5:17am, Glenn McCord wrote: >> >>> Hi. I've been trying to find out the

Re: [sqlite] Loading a database from memory

2011-07-18 Thread Glenn McCord
On Tue, Jul 19, 2011 at 4:31 PM, Simon Slavin <slav...@bigfraud.org> 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

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

[sqlite] Loading a database from memory

2011-07-18 Thread Glenn McCord
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 write it back to the file. I'm starting to get