Re: [sqlite] How do I get back command history in v3.5.4?

2008-01-15 Thread John Stanton
Do you have readline installed on your Linux machine? If not download the package, configure and install. Then compile Sqlite with readline. Fred J. Stephens wrote: Just replaced SQLite v 3.42 on Kubuntu 7.10 with the new v3.45 binary downloaded from sqlite.org. it works fine, but now I

Re: [sqlite] SQLite as a IPC mechanism

2008-01-15 Thread Ken
Joshua, I don't think sqlite was designed to be used that way. It would work very well for your persistent data, that is written to disk. However, not so well using it as an IPC. The database is locked, not the table, row or even page. The entire DB is locked when you write (insert, update or

[sqlite] Berkeley DB vs. SQLite for threaded application

2008-01-15 Thread Tomas Lee
I've got an application that has Berkeley DB embedded in it. I want to replace Berkeley DB with SQLite. (I plan to use the 3.5.4 almagamation, which is the latest I could find.) The thing is, this application uses threads. I know threads are evil, but this application uses them, and there it

[sqlite] How do I get back command history in v3.5.4?

2008-01-15 Thread Fred J. Stephens
Just replaced SQLite v 3.42 on Kubuntu 7.10 with the new v3.45 binary downloaded from sqlite.org. it works fine, but now I don't have the (essential, to me) command history. I have searched the forums and read that it requires readline. I do have /lib/libreadline.so.5. I tried compiling from

Re: [sqlite] Next Version of SQLite

2008-01-15 Thread John Stanton
[EMAIL PROTECTED] wrote: Joe Wilson <[EMAIL PROTECTED]> wrote: --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: Sorry for the confusion. No problem. For what it's worth, I am also curious as to the final form of the VM opcode transformation. The number of opcodes generated by the various

Re: [sqlite] Test suite

2008-01-15 Thread Joe Wilson
Grab the source tree via tar.gz file or cvs and run: ./configure make test or make fulltest To run just a single test file: make testfixture# if not already built by make test ./testfixture test/select1.test --- Ken <[EMAIL PROTECTED]> wrote: > Sorry if this has been asked, but

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread Rich Shepard
On Tue, 15 Jan 2008, Rob Sciuk wrote: Is there a way to dump out the contents of the database w/o having the CREATE TABLE statements? For example, I can do the following: However, foo.dmp contains all of the CREATE TABLE statements. I just want all of the INSERT INTO statements associated

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread P Kishor
On 1/15/08, Mark Riehl <[EMAIL PROTECTED]> wrote: > I'm coming from a MySQL background and the mysqldump utility supports > schema-only, sqlite> .mode filename sqlite> .s > data-only, sqlite> .mode filename sqlite> .mode csv|tabs sqlite> .dump > and schema plus data dumps. sqlite> .mode

[sqlite] Date arithmetic question

2008-01-15 Thread Fowler, Jeff
Hello All, SQLite newbie here. I've looked through the email archives and website trying to find out how to compute the difference in months between two given dates. Each date is in -MM-DD HH:MM:SS format. The best I've been able to come up with seems rather ugly: SELECT (strftime( '%Y',

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread Mark Riehl
I'm coming from a MySQL background and the mysqldump utility supports schema-only, data-only, and schema plus data dumps. I thought that there was an SQLite trick I was missing somewhere. Mark On Jan 15, 2008 4:10 PM, Rob Sciuk <[EMAIL PROTECTED]> wrote: > > > On Tue, 15 Jan 2008, Mark Riehl

Re: [sqlite] [Linux + PHP] Recommended way to access SQLite?

2008-01-15 Thread Kees Nuyt
On Tue, 15 Jan 2008 11:33:06 -0800 (PST), "kamil.szot" <[EMAIL PROTECTED]> wrote: > > >Gilles Ganault wrote: >> >> So the options are: >> 1. use the old SQLite2 sqlite_() functions (or some class that turns this >> into OO) >> 2. PDO to use the SQLite3 linked-in library >> 3. PDO to access the

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread Rob Sciuk
On Tue, 15 Jan 2008, Mark Riehl wrote: Is there a way to dump out the contents of the database w/o having the CREATE TABLE statements? For example, I can do the following: sqlite3 foo.db .dump > foo.dmp However, foo.dmp contains all of the CREATE TABLE statements. I just want all of the

Re: [sqlite] SQLite as a IPC mechanism

2008-01-15 Thread Clay Dowling
Seems like it would work, but maybe overkill. What's stopping you from working out a fairly direct protocol to exchange data with? Sending key, type, val for all of your IPC seems reasonable. A mem-mapped file, a local socket or a network socket seem reasonable, depending on the structure of

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread Richard Klein
Mark Riehl wrote: Is there a way to dump out the contents of the database w/o having the CREATE TABLE statements? For example, I can do the following: sqlite3 foo.db .dump > foo.dmp However, foo.dmp contains all of the CREATE TABLE statements. I just want all of the INSERT INTO statements

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread Mike McGonagle
On Jan 15, 2008 2:37 PM, Mark Riehl <[EMAIL PROTECTED]> wrote: > Is there a way to dump out the contents of the database w/o having the > CREATE TABLE statements? For example, I can do the following: > > sqlite3 foo.db .dump > foo.dmp > You could do something like on Unix: sqlite3 foo.db .dump

[sqlite] SQLite as a IPC mechanism

2008-01-15 Thread Joshua D. Boyd
I have a system that currently consists of 2 C programs and 3 python programs. Currently the python programs transfer data between themselves via pickles. The C programs transfer data between themselves via streaming structs, and the C programs talk to one of the python programs via a fairly

[sqlite] Dump w/o Schema

2008-01-15 Thread Mark Riehl
Is there a way to dump out the contents of the database w/o having the CREATE TABLE statements? For example, I can do the following: sqlite3 foo.db .dump > foo.dmp However, foo.dmp contains all of the CREATE TABLE statements. I just want all of the INSERT INTO statements associated with this

Re: [sqlite] [Linux + PHP] Recommended way to access SQLite?

2008-01-15 Thread kamil.szot
Gilles Ganault wrote: > > So the options are: > 1. use the old SQLite2 sqlite_() functions (or some class that turns this > into OO) > 2. PDO to use the SQLite3 linked-in library > 3. PDO to access the SQLite3 DLL > > ... with 2 being the recommended choice. > With 2 (and probably 3) you

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread Mike McGonagle
On Jan 14, 2008 11:28 PM, mark pirogovsky <[EMAIL PROTECTED]> wrote: > It is really hard to give you some idea without knowing more of you > problem... but your proposed implementation does carry a lot of > overhead - for every number you have two extra fields, not to mention > the database

[sqlite] Test suite

2008-01-15 Thread Ken
Sorry if this has been asked, but I'd like to know how to run the test suite. I could not find any documentation on this on the sqlite website. Thanks for your help. Ken

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Ken
Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken wrote: > Doing this in oracle results in an error: > > SQL> select max(addr_id), emp_id from z_address; > select max(addr_id), emp_id from z_address > * > ERROR at line 1: > ORA-00937: not a single-group group function As

[sqlite] How to compile SQLite with SQLITE_ENABLE_COLUMN_METADATA option under Ubuntu Linux

2008-01-15 Thread Luc DAVID
Thank you Jay for your answers. I will try the 'lib' program. Luc - To unsubscribe, send email to [EMAIL PROTECTED] -

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Joe Wilson
--- Ken <[EMAIL PROTECTED]> wrote: > Doing this in oracle results in an error: > > SQL> select max(addr_id), emp_id from z_address; > select max(addr_id), emp_id from z_address > * > ERROR at line 1: > ORA-00937: not a single-group group function As expected. > I think an

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread P Kishor
On 1/15/08, Joe Wilson <[EMAIL PROTECTED]> wrote: > > On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > > > Some relational (PostgreSQL for example) databases allow you to store > > > arbitrary array as a field in on row. > > I was not aware of Postgres arrays or that it is part of the >

Re: [sqlite] Storing / Archiving of SQLite database in vcs

2008-01-15 Thread Ken
I would tend to lean towards cvs storage as a flat file .dump format of the database rather than the binary database. 1. Its more portable. What happens if sqlite is no longer maintained or actively developed? 2. Create the db is simple. Allowing you easy migration from one version of

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Ken
Doing this in oracle results in an error: SQL> select max(addr_id), emp_id from z_address; select max(addr_id), emp_id from z_address * ERROR at line 1: ORA-00937: not a single-group group function I think an error is more appropriate when there is no group by clause. But

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread Joe Wilson
> On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > > Some relational (PostgreSQL for example) databases allow you to store > > arbitrary array as a field in on row. I was not aware of Postgres arrays or that it is part of the SQL:1999 standard:

[sqlite] Apple Filemaker's Bento uses SQLite

2008-01-15 Thread P Kishor
I have always wondered how long would it be before Apple offered a front-end to SQLite. Well, the wait has ended with Filemaker's Bento. Create a new "library" (another name for a table/database... not clear which), and it gets stored in ~/Library/Application Support/Bento/bento.bentodb in a

[sqlite] Storing / Archiving of SQLite database in vcs

2008-01-15 Thread Rich Rattanni
All: I have several sqlite databases that I want to store in my version control system. I was wondering if instead of storing them as binary files, would make sense to store a SQL dump in version control. When I create a root file system for my development board I will create the databases from

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread P Kishor
with SQLite being the db... On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > Some relational (PostgreSQL for example) databases allow you to store > arbitrary array as a field in on row. So your retrieval would be much > easier. > Also depending on your performance requirements you can

RE: [sqlite] WHERE SomeColumn IN (@SQLiteParameter) ???

2008-01-15 Thread Samuel R. Neff
Since you need notification of data so quickly, perhaps it would be better to use some type of notification table that indicates when new data is available and a trigger to populate this table. Then you can query SELECT MAX(ID) FROM Notifications which is ridiculously fast. HTH, Sam

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Darren Duncan
At 11:41 PM -0800 1/14/08, Joe Wilson wrote: In sqlite, assuming there's at least one row, an aggregate SELECT with no GROUP BY clause is conceptually the same as an equivalent SELECT with GROUP BY NULL - i.e., the group of all rows. (I say 'conceptually' because GROUP BY NULL is much slower).