Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
I think I gave a wrong example. This simple tree will probably sort ok with "order by path, data." But if I introduce more children with subchildren, say, at level 1, the problem of clubbing will be apparent. -- View this message in context: http://www.nabble.com/Managing-trees-in-the-database-t1

[sqlite] Determining primary keys

2006-02-16 Thread Robert Simpson
Given the following schema ... create table foo ( id integer, otherid integer, myvalue varchar(50), constraint foo_1 primary key (id, otherid), constraint foo_2 unique (myvalue)); create unique index foo_index on foo (otherid); Three indexes are created. pragma index_list(foo) re

Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
This path is a nice idea to keep it simple for what I want to do. But I have a question: Suppose the database is like this: id, parentid, data 1, 0, parent 2, 1, son B 3, 1, son A 4, 1, daughter A 5, 1, daughter B 6, 2, grandchild B 7, 2, grandchild A Using the path approach, how can I sort th

Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
Fascinating! I got another reply too by email pointing to the book by Joe Celko. Thanks, Sanjay -- View this message in context: http://www.nabble.com/Managing-trees-in-the-database-t113.html#a2983825 Sent from the SQLite forum at Nabble.com.

[sqlite] sqlite3_exec vs. sqlite3_prepare / sqlite3_step

2006-02-16 Thread Pavan Savoy
Hi, sqlite3_exec is a wrapper function for sqlite3_prepare / step, but which one of these is faster, I mean in terms of execution. sqlite3_exec should still call a callback function and do all the string handling !! Also how do I use sqlite3_exec along with BLOB, I am currentl

[sqlite] Possible feature request 'Raw Row' representation

2006-02-16 Thread w b
Hi, I was wondering if this could be a useful addition to the SQLITE API set. I'm not sure if this possible to create so figured I'd post it here for further discussion rather than blindly putting it in as an enhancment request. Just for some background I have an application that runs on

Re: [sqlite] using sqlite in kernel space

2006-02-16 Thread Christian Smith
On Thu, 16 Feb 2006, Ramamurthy, Sivasundar (IPQoS-SNSL) wrote: >Hello, > can sqlite be used to perform database operations from kernel space? Or >can it be used only in user space? In it's current form, it's user space only. You'd have to write your own os_.c, to provide your OS dependent file

Re: [sqlite] "bad" SQL runs on CREATE

2006-02-16 Thread Kiel W
On 2/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > SQLite, by design, accepts any data type. Even those you > might not have heard of before. This is a feature, not a > bug. It seems odd that a data type could be multiple words, but hey, that's just me. hmm, ok. Well no complaints if tha

Re: [sqlite] Managing trees in the database

2006-02-16 Thread Dennis Cote
Philipp Knüsel wrote: SanjayK schrieb: Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See: htt

Re: [sqlite] "bad" SQL runs on CREATE

2006-02-16 Thread drh
Dave Dyer <[EMAIL PROTECTED]> wrote: > > > >SQLite thinks you have declared a column named "active" > >with a datatype of "BOOL JOINED DATE". > > Since BOOL JOINED DATE doesn't correspond to any known > data type, shouldn't it be flagged as an error? Surely > the declaration of a table shouldn't

Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread John Stanton
Take the -g out of the compiler directives in the makefile to prevent debug code being generated. You might do well to add -O2 for optimization. Your library will be much smaller. JS jam_lraep wrote: Hi sqlite-users-help, I have compiled SQLITE with MINGW and the resultant library libsqlite3.

[sqlite] Re: "bad" SQL runs on CREATE

2006-02-16 Thread Dave Dyer
> >SQLite thinks you have declared a column named "active" >with a datatype of "BOOL JOINED DATE". Since BOOL JOINED DATE doesn't correspond to any known data type, shouldn't it be flagged as an error? Surely the declaration of a table shouldn't accept garbage.

Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread Dennis Cote
jam_lraep wrote: I have only downloaded, unzipped SQLite-3.3.3.tar.gz and launched the followings commands: ./configure make && make install if there is another way to compile the library I don't know it... I am using MINGW as well I got (3.2.8) 8 Meg with -g3 -O0 450 Kb with -O0 400

Re: [sqlite] "bad" SQL runs on CREATE

2006-02-16 Thread drh
Kiel W <[EMAIL PROTECTED]> wrote: > In version: 3.3.1 > > The following SQL runs fine without any errors: > > CREATE TABLE lnk_assoc_person ( > assoc TEXT, > person TEXT, > active BOOL > joined DATE, > left DATE > ); > > Notice the lack of a comma behind 'active B

[sqlite] "bad" SQL runs on CREATE

2006-02-16 Thread Kiel W
In version: 3.3.1 The following SQL runs fine without any errors: CREATE TABLE lnk_assoc_person ( assoc TEXT, person TEXT, active BOOL joined DATE, left DATE ); Notice the lack of a comma behind 'active BOOl'. Is this considered a bug or expected behavior? It is

Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread Danilo
Clay Dowling ha scritto: jam_lraep said: I have only downloaded, unzipped SQLite-3.3.3.tar.gz and launched the followings commands: ./configure make && make install if there is another way to compile the library I don't know it... There's probably a slicker way to do this, but as a crude hack

Re: Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread Clay Dowling
jam_lraep said: > I have only downloaded, unzipped SQLite-3.3.3.tar.gz and launched the > followings commands: > ./configure > make && make install > > if there is another way to compile the library I don't know it... There's probably a slicker way to do this, but as a crude hack you can search t

Re: Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread jam_lraep
I have only downloaded, unzipped SQLite-3.3.3.tar.gz and launched the followings commands: ./configure make && make install if there is another way to compile the library I don't know it... > >I am using MINGW as well > >I got (3.2.8) > > >8 Meg with -g3 -O0 > >450 Kb with -O0 > >400 kB with -O2

Re: [sqlite] Managing trees in the database

2006-02-16 Thread Philipp Knüsel
SanjayK schrieb: Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See: http://www.adp-gmbh.ch/ora

[sqlite] using sqlite in kernel space

2006-02-16 Thread Ramamurthy, Sivasundar (IPQoS-SNSL)
Hello, can sqlite be used to perform database operations from kernel space? Or can it be used only in user space? thanks, Siva

[sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See: http://www.adp-gmbh.ch/ora/sql/connect_by.ht

Re: [sqlite] Shared Memory Question

2006-02-16 Thread Mateus Cordeiro Inssa
> This is likely a naive response, but on Linux have you thought >using /dev/shm? It's a tmpfs ramdisk that is needed by POSIX shared memory >calls shm_open and shm_unlink in glibc 2.2 and above. It grows and shrinks as >required and uses almost no memory if it's never populated with files. >

[sqlite] --disable-readline configure option

2006-02-16 Thread Artzi, Yoav \(Yoav\)
Is it possible to see on the official release a --disable-readline option? I think it will help greatly on cross compile builds, which currently have to use a makefile instead of the configure. Thanks.

Re: [sqlite] offset 2F

2006-02-16 Thread drh
Sergey Startsev <[EMAIL PROTECTED]> wrote: > Hello, > > Thursday, February 16, 2006, 7:52:12 PM, you wrote: > > dhc> That would be the least significant byte of the 4-byte > dhc> schema-layer file format version number. Why is that > dhc> important for you to know? > > My user writes, that ca

[sqlite] Re: Deleted rows count information

2006-02-16 Thread Igor Tandetnik
Shivaranjani wrote: Is there any function in SQLite which will give me information about the deleted rows during a Particular delete operation. sqlite3_changes http://sqlite.org/capi3ref.html#sqlite3_changes Igor Tandetnik

Re[2]: [sqlite] offset 2F

2006-02-16 Thread Sergey Startsev
Hello, Thursday, February 16, 2006, 7:52:12 PM, you wrote: dhc> That would be the least significant byte of the 4-byte dhc> schema-layer file format version number. Why is that dhc> important for you to know? My user writes, that cannot open a database. His "bad" file contains value 01 on

Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread Clay Dowling
jam_lraep said: > Hi sqlite-users-help, > I have compiled SQLITE with MINGW and the resultant library libsqlite3.a > results very great (about 8MB), it probably contains the symbols for the > debugger. How can I eliminate them? > Do I have to modify the makefile? Thanks to all. Use the strip comm

Re: [sqlite] Can sqlite support

2006-02-16 Thread Clay Dowling
Jiao said: > Hi,all > NOW I want to use sqlite in an embedded device.In my design ,a web cgi > in a single process is used to update configuration,and I expect my main > application in another process can be noticed whenever its configuration > is changed, how to use sqlite to achieve this goal,

Re: [sqlite] offset 2F

2006-02-16 Thread drh
Sergey Startsev <[EMAIL PROTECTED]> wrote: > Hello, > > What means one byte in a database file on offset 2F? > That would be the least significant byte of the 4-byte schema-layer file format version number. Why is that important for you to know? -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] offset 2F

2006-02-16 Thread Sergey Startsev
Hello, What means one byte in a database file on offset 2F? -- Best regards Sergey Startsev SQLite Analyzer - SQLite database management tool with GUI. http://www.kraslabs.com/sqlite_analyzer.html

Re: [sqlite] SQLITE with MINGW

2006-02-16 Thread Massimo Gaspari
I am using MINGW as well I got (3.2.8) 8 Meg with -g3 -O0 450 Kb with -O0 400 kB with -O2 Dont use -g or -g3. I am not using makefile so I selected my own compiler switches. If you are using a makefile you have to modify it to remove the -g options. Max "jam_lraep" <[EMAIL PROTECTED]>

[sqlite] SQLITE with MINGW

2006-02-16 Thread jam_lraep
Hi sqlite-users-help, I have compiled SQLITE with MINGW and the resultant library libsqlite3.a results very great (about 8MB), it probably contains the symbols for the debugger. How can I eliminate them? Do I have to modify the makefile? Thanks to all. Cheers Danilo. [EMAIL PROTECTED] Home P