[sqlite] Virtual tables and OR clause

2011-05-04 Thread Schrum, Allan
Hi Folks, Using virtual tables the WHERE clause is broken up and sent to the "best index" function to determine the best index. Then the "filter" function is called to perform the actual work. I've noticed that the SQLITE engine seems to process OR clauses outside of the virtual table process,

Re: [sqlite] Detecting storage class from C

2010-09-08 Thread Schrum, Allan
I guess I'm confused as to why sqlite3_column_type() would not work? It works for me on queries and I get back either SQLITE_INTEGER, SQLITE_FLOAT, or SQLITE3_TEXT. While I know the types could be coerced to something else, at least it is an answer of what you originally intended the column to b

Re: [sqlite] SQLite on Windows 2003

2010-04-08 Thread Schrum, Allan
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Igmar Palsenberg > Sent: Thursday, April 08, 2010 6:18 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite on Windows 2003 > > > > First of all

Re: [sqlite] Question about lemon

2010-04-05 Thread Schrum, Allan
Hi Andy, Instead of adding the definition cmd ::= set_item. have you thought about defining the acceptable alternatives to "SET"? For instance, set ::= SET. set ::= . cmd ::= set set_list. The way you specified it on "cmd" I think created your problem. By adding another level it may give the

Re: [sqlite] why is underscore like dash?

2010-03-02 Thread Schrum, Allan
Perhaps because underscore is considered to be a wild-card search character. Take a look at: http://sqlite.org/lang_expr.html#like If you want to match underscore literally, use an optional escape character clause and escape the underscore. -Allan > -Original Message- > From: sqlite-us

Re: [sqlite] ambiguous column name

2009-12-23 Thread Schrum, Allan
Forgot to mention, compare the previous query to: select * from t1 left join t2 on t1.a = t2.a left join t3 on t1.a = t3.a; a|a|a 1|| -Allan > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Schrum, All

Re: [sqlite] ambiguous column name

2009-12-23 Thread Schrum, Allan
The TK_ALL ("*") expansion explicitly removes duplicate columns from tables joined using a natural join or those found in a "using" statement. For those interested in the code, check out selectExpander() +165 through +178. So while the "*" expansion only shows column "a", it happens to be showin

Re: [sqlite] Bug: Problem with left-outer join and virtual tables. Version 3.6.18 and trunk

2009-12-02 Thread Schrum, Allan
un...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Schrum, Allan > Sent: Monday, November 23, 2009 11:29 AM > To: General Discussion of SQLite Database > Subject: [sqlite] Bug: Problem with left-outer join and virtual tables. > Version 3.6.18 and trunk > >

Re: [sqlite] Error: file is encrypted or is not a database

2009-11-25 Thread Schrum, Allan
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Dmitri Priimak > Sent: Wednesday, November 25, 2009 11:39 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Error: file is encrypted or is not a databas

[sqlite] Bug: Problem with left-outer join and virtual tables. Version 3.6.18 and trunk

2009-11-23 Thread Schrum, Allan
Hi Folks, I have a virtual table implementation currently based upon 3.6.18 sources. I have found a bug in the way left outer joins are implemented in SQLITE3 that causes bad results to occur. The short description of the problem is that the temporary registers setup to fetch data from the virt

Re: [sqlite] is ticket 4037 not a bug?

2009-11-19 Thread Schrum, Allan
This was brought up before by me here: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2009-September/015484.html The response was: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2009-September/015486.html Which said: According to http://www.sqlite.org/lang_select.html a

[sqlite] Inconsistency in mutex.h and mutex.c

2009-09-29 Thread Schrum, Allan
At the bottom of mutex.h there is an: #ifdef SQLITE_MUTEX_OMIT ... #endif /* defined(SQLITE_OMIT_MUTEX) Either the comments or the define should be changed. This occurs in mutex.c as well. The pattern for all other "OMIT" definitions is SQLITE_OMIT_% so it would be nice if this one could be ch

[sqlite] Feature Request Discussion: Virtual Table Column Use identification

2009-09-29 Thread Schrum, Allan
Hi Folks, I need to know what columns of my virtual table implementation are used for a particular query or not. The computation of the columns is expensive and cannot be deferred until the call to xColumn(). Thus I need to know before the first row is fetched so that I can be efficient in my o

[sqlite] Inconsistent behavior - perhaps a bug?

2009-09-25 Thread Schrum, Allan
$ bin/sqlite3 SQLite version 3.6.17 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t(a integer); sqlite> select main.t.* from t; SQL error: near "*": syntax error sqlite> select main.t.* from main.t; SQL error: near "*": syntax error sqlite> select t.

Re: [sqlite] shared library location on Linux question

2009-09-03 Thread Schrum, Allan
> Subject: [sqlite] shared library location on Linux question > > I'm trying to run a .NET program on Linux using MONO that makes use of > SQLite and nHibernate. I've got the managed code only > System.Data.SQLite.dll and use the sqlite3.dll on Vista and my program > and tests run fine. However,