[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-22 Thread Mark Brand
Hi, For the query below, versions 3.8.11.0 and 3.8.11.1 return only 1 row. For some reason, the LEFT JOIN seems to behave like a JOIN. Older versions (tested 3.8.7.4 and 3.8.10.2) correctly return 2 rows. SELECT * FROM ( SELECT 'apple' fruit UNION ALL SELECT 'banana' ) a JOIN (

[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-22 Thread Mark Brand
Just realized that this simpler case shows the same problem: SELECT * FROM ( SELECT 'apple' fruit UNION ALL SELECT 'banana' ) a LEFT JOIN ( SELECT 1 isyellow ) c ON a.fruit='banana' ; On 22/08/15 00:58, Mark Brand wrote: > Hi, > > For the query below, versions 3.8.11.0 and

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread sqlite-mail
Hello ! I'm testing the new json functions and when I tried this: select json_array(*) as json from one_table; I've got : [] [] .. Then I tried with some custom functions accepting variable number of parameters and realize that "*" is not expanded for function calls. There

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-22 Thread Kees Nuyt
On Fri, 21 Aug 2015 22:58:51 +0200, "sqlite-mail" wrote: > That's why I think that expose a basic SQL ANSI catalog would make this kind > of work and others a lot easier. That would be nice to have in some development environment (you could develop one, if nobody else has done it), but in my

[sqlite] When sqlite3_close() returns SQL_BUSY

2015-08-22 Thread Jeff M
The doc page for SQLITE_BUSY covers SQLITE_BUSY when there are multiple connections to the database. SQLite Result Codes (SQLITE_BUSY) http://www.sqlite.org/rescode.html#busy But, I have only one connection. I believe the case where SQLITE_BUSY is returned by sqlite_close()

[sqlite] libtclsqlite3 assistance

2015-08-22 Thread Eduardo Morras
On Fri, 21 Aug 2015 20:19:38 -0700 jungle Boogie wrote: > Hi Dr. H, > On 21 August 2015 at 14:23, Richard Hipp wrote: > > On 8/21/15, jungle Boogie wrote: > >> > >> Is it possible to compile in libtclsqlite3? > >> > > > > Dunno. But you can compile the libtclsqlite3.so yourself: > > > >

[sqlite] When sqlite3_close() returns SQL_BUSY

2015-08-22 Thread Eduardo Morras
On Sat, 22 Aug 2015 05:07:55 -0500 Jeff M wrote: > The doc page for SQLITE_BUSY covers SQLITE_BUSY when there are > multiple connections to the database. > > SQLite Result Codes (SQLITE_BUSY) > http://www.sqlite.org/rescode.html#busy > > But, I have only one connection. I believe

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-22 Thread Tim Streater
On 22 Aug 2015 at 11:01, Kees Nuyt wrote: > It even would be fine to me if all ALTER TABLE features would be > removed. I disagree with this, although I'd be satisfied if there were a separate library and API for such things. With an evolving application I need to have ALTER TABLE. Even the

[sqlite] When sqlite3_close() returns SQL_BUSY

2015-08-22 Thread Jeffrey Mattox
No, I needed to set a timeout (see previous messages in this thread). I've fixed my problem. I'm suggesting now that the documentation for SQLITE_BUSY is incomplete. Jeff > On Aug 22, 2015, at 5:13 AM, Eduardo Morras wrote: > > On Sat, 22 Aug 2015 05:07:55 -0500 > Jeff M wrote: > >> The

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread Richard Hipp
On 8/22/15, sqlite-mail wrote: > > Then I tried with some custom functions accepting variable number of > parameters and realize that "*" is not expanded for function calls. > > There is any reason for it or it's a forgotten implementation ? > Well, one reason is that "somefunction(*)" does not

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread sqlite-mail
Thanks for the answer ! How hard would be to implement something like that ? O maybe a function called "expand" that would return the expanded wildcard parameters ? Ex: select json_array(expand(*)) as json from one_table; Ex2 inside a trigger: select raise("Something is not right here

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread R.Smith
On 2015-08-22 11:42 AM, sqlite-mail wrote: > Hello ! > > I'm testing the new json functions and when I tried this: > > select json_array(*) as json from one_table; > > I've got : > > [] > > [] > > .. > > Then I tried with some custom functions accepting variable number of > parameters and

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread afriendandmore
but I fail to get it done. Hello, I got the following problem, that I cannot get worked out. I have a table that has 3 columns A, B and C. C is a boolean Column, that indicates if the record has been logically deleted, It shall not be removed from the database. The table shall be ordered

[sqlite] Compile warnings

2015-08-22 Thread David Bennett
True. The C89/90 standard has of course been withdrawn and I don't have a copy. However, based on the drafts I have available the entirety of the text I quoted was added after the last correction to C89/90 and first appears in C99. In my opinion it would be unwise to rely on the omission of

[sqlite] Stuck in busy handler

2015-08-22 Thread Jon Kuhn
I am running into a situation with 2 threads where a busy handler is being called on one thread and unless the busy handler returns 0 and the calling code retries the query, neither thread will be able to make progress. Below is some background information: I am working on project that uses

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread Clemens Ladisch
afriendandmore wrote: > The table shall be ordered according to A. (Order by A) > But if C ist true and to the value B1 in this Record, there exists another > Record with B2 and B2 = B1, then B1 should be ordered in the row above B2. Do those two records have the same A values? Regards,

[sqlite] Stuck in busy handler

2015-08-22 Thread Simon Slavin
On 22 Aug 2015, at 2:33pm, Jon Kuhn wrote: > I am working on project that uses SQLite to save records in an in memory > database and periodically push them to an on-disk database. The project is > multi-threaded with several threads accessing the databases (memory and > on-disk) at the same

[sqlite] Compile warnings

2015-08-22 Thread Scott Robison
Unless of course your objective is to write maximally portable code. It's not perfect, and certainly things have been done to accommodate more recent standards, but C89 compilers (including compilers that claim to support it through a switch) are more common than even full C99 implementations.

[sqlite] Compile warnings

2015-08-22 Thread Richard Hipp
On 8/22/15, Scott Robison wrote: > I don't object to a change to accommodate C99 null > pointer requirements Please note that the warning in question has nothing to do with NULL pointers. The pointer parameter (0) is non-null. The issue is that the last parameter (2) which is a size_t might

[sqlite] design problem involving trigger

2015-08-22 Thread R.Smith
On 2015-08-21 11:23 PM, Will Parsons wrote: > On 21 Aug 2015, R.Smith wrote: >> >> On 2015-08-21 04:47 AM, Will Parsons wrote: >>> I'm working on a program that involves a catalogue of books. Part of >>> the database schema looks like this: >>> >>> create table Books(id integer primary key, >>>

[sqlite] Compile warnings

2015-08-22 Thread Scott Robison
On Sat, Aug 22, 2015 at 10:31 AM, Richard Hipp wrote: > On 8/22/15, Scott Robison wrote: > > I don't object to a change to accommodate C99 null > > pointer requirements > > Please note that the warning in question has nothing to do with NULL > pointers. The pointer parameter (0) is non-null.

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread Kevin Benson
On Sat, Aug 22, 2015 > afriendandmore wrote: > > The table shall be ordered according to A. (Order by A) > > But if C ist true and to the value B1 in this Record, there exists > another Record with B2 and B2 = B1, then B1 should be ordered in the row > above B2. If the B1 and B2, to which you

[sqlite] DbFunctions.TruncateTime

2015-08-22 Thread Steffen Mangold
> > how can I trunc time in EntityFramework? > > I tried it this way: > > model.Datas >.GroupBy(d => > DbFunctions.TruncateTime(d.TimeStamp)) >.Select(d => d.Key.Value) >.ToArray(); > > But get this error: >

[sqlite] DbFunctions.TruncateTime

2015-08-22 Thread Steffen Mangold
Hi Ryan, I get your point. :) It seems the I was misunderstanding this help mailing list. I thought it's also support for 'System.Data.SQLite'. In the way 'System.Data.SQLite' is an ADO.NET provider for SQLite and also give support for entity framework. that because I was asking if it support

[sqlite] design problem involving trigger

2015-08-22 Thread Will Parsons
On Saturday, 22 Aug 2015 1:05 PM -0400, R.Smith wrote: > > > On 2015-08-21 11:23 PM, Will Parsons wrote: >> On 21 Aug 2015, R.Smith wrote: >>> >>> On 2015-08-21 04:47 AM, Will Parsons wrote: I'm working on a program that involves a catalogue of books. Part of the database schema looks