[sqlite] Triggers

2004-01-09 Thread Brady Hutmacher (AKA Capt. Hack'em)
I am having trouble getting the exact syntax for a trigger. I'm new to triggers, so I'm sure this will be easy for some of you. Table Items: ID Integer Primary Key ... [rest of fields ] Tables Stats: ID ... rest of fields I want to delete a row in Items and have that trigger the deletion of all

[sqlite] regex support for sqlite

2004-01-09 Thread Brad Campbell
G'day all, Newbie alert in both sqlite and SQL in general and I'm trying to do something reasonably complex. Please bear with me. I'm in the process of integrating regex support into sqlite. Can someone give me a quick rundown on how to run the regression test suite so I can check that the cha

Re: [sqlite] a few questions about indexes

2004-01-09 Thread Culley Harrelson
ok. As I am sure you realize it would be very useful to be able to create case-insensitive indexes with: create index idx_my_index on my_table(lower(my_column)); culley On Friday, January 9, 2004, at 05:25 PM, D. Richard Hipp wrote: culley harrelson wrote: 1. Are indexes case sensitive as in

[sqlite] How to update a whole column

2004-01-09 Thread James W. Walker
What is the fastest way to change the values in one column in every row? What I thought of was like so: BEGIN TRANSACTION; UPDATE MyTable SET TheCol=7 WHERE keyCol=1; UPDATE MyTable SET TheCol=8 WHERE keyCol=2; ... and so on for each row COMMIT; -- James W. Walker, ScriptPerfection Enterprises

[sqlite] Using Mono client in Microsoft.Net

2004-01-09 Thread Tim Anderson
The Mono project at http://www.go-mono.com has a Sqlite data provider written in C#. You can compile this on Windows for use with Microsoft .Net (as opposed to Mono) but it doesn't work as-is. I made the following changes to get it working: Added the Cdecl attribute to the PInvoke declarations: [

Re: [sqlite] a few questions about indexes

2004-01-09 Thread D. Richard Hipp
D. Richard Hipp wrote: culley harrelson wrote: 2. Are indexes on date fields treated just like an index on a text field? Anything special about date fields? No. That should be "Yes" to the first question and "No" to the second. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 ---

Re: [sqlite] a few questions about indexes

2004-01-09 Thread D. Richard Hipp
culley harrelson wrote: 1. Are indexes case sensitive as in postgresql? Yes 2. Are indexes on date fields treated just like an index on a text field? Anything special about date fields? No. 3. Any plans to allow index creation on functions (aka the date functions)? Yes. -- D. Richard Hipp -- [E

[sqlite] a few questions about indexes

2004-01-09 Thread culley harrelson
Hi, I have a few questions about indexes: 1. Are indexes case sensitive as in postgresql? 2. Are indexes on date fields treated just like an index on a text field? Anything special about date fields? 3. Any plans to allow index creation on functions (aka the date functions)? culley

Re: [sqlite] locked - what am I doing wrong?

2004-01-09 Thread Doug Currie
> any plans/desires to fix this I hesitate to announce this for reasons I'll explain below, but I have been working on an experimental version on the SQLite pager called the Shadow Pager. The Shadow Pager is intended to address this problem for applications that use SQLite from a single process on

RE: [sqlite] locked - what am I doing wrong?

2004-01-09 Thread Williams, Ken
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > The important thing to understand here, is that you're not stepping > through a set of results that you have in memory and that > were extracted > from the database. You are (at least for simple queries) > ste

Re: [sqlite] Many bugs with threads (errors and corruption)

2004-01-09 Thread Guillaume Fougnies
Fri, Jan 09, 2004 at 09:08:37AM -0500: D. Richard Hipp wrote: > Guillaume Fougnies wrote: > Probably the SQLITE_SCHEMA error is being incorrectly converted > into an SQLITE_ERROR somewhere as the call stack unwinds. I'll > fix it - but I consider this a minor problem. If you can give > me more hi

Re: [sqlite] Many bugs with threads (errors and corruption)

2004-01-09 Thread D. Richard Hipp
Guillaume Fougnies wrote: CFLAGS : -O2 -ggdb -DTHREADSAFE=1 -DNDEBUG=0 \ -DOS_UNIX=1 -DOS_WIN=0 -DHAVE_USLEEP=1 For debugging, it is best, I think, to omit the -DNDEBUG altogether. Unless I'm badly mistaken, any definition of the NDEBUG macro will disable the assert()s, even a definition of

[sqlite] Many bugs with threads (errors and corruption)

2004-01-09 Thread Guillaume Fougnies
I'm embedding sqlite using pthread. I have multiple tables creation table on the fly and many concurrent accesses. Sqlite version : 2.8.9 OS : Linux Debian Cc : gcc version 3.3.2 CFLAGS : -O2 -ggdb -DTHREADSAFE=1 -DNDEBUG=0 \ -DOS_UNIX=1 -DOS_WI

Re: [sqlite] Corrupt database problem.

2004-01-09 Thread D. Richard Hipp
Liz Steel wrote: I'm getting an error in my code when I perform a sqlite_finalize on a particular table. I have stepped through the code and no rows are returned, but why do I get the error here, rather than on sqlite_compile, or sqlite_open? I've looked at the database using the command line i

[sqlite] Corrupt database problem.

2004-01-09 Thread Liz Steel
I'm getting an error in my code when I perform a sqlite_finalize on a particular table. I have stepped through the code and no rows are returned, but why do I get the error here, rather than on sqlite_compile, or sqlite_open? I've looked at the database using the command line interface, and whe