[sqlite] Table qualification not supported in some cases (was: quasi-bug related to locking, and attached databases)

2014-10-28 Thread Hick Gunter
Indices, foreign keys, ... all work only within a single DB file, so allowing a qualifier would suggest functionality that is not present and probably quite hard to provide. How would one keep an index residing in one DB file consistent with a table in a different file if only one of the

Re: [sqlite] Table qualification not supported in some cases (was: quasi-bug related to locking, and attached databases)

2014-10-28 Thread Stephan Beal
On Tue, Oct 28, 2014 at 8:24 AM, Hick Gunter wrote: > Indices, foreign keys, ... all work only within a single DB file, so > allowing a qualifier would suggest functionality that is not present and > probably quite hard to provide. > We've got no intention of trying to rely

[sqlite] Access Temp Tables/Views in background thread

2014-10-28 Thread Balance On I
Hi All, I have an application where I create a temp table/view in one thread. I then try to perform some operations in background and I don’t have access to those temp objects. I thought that those were process scoped. Is it possible to access temp tables/views from across threads? I am

Re: [sqlite] Delphi->COM->.NET->System.Data.SQLite->System.Interop.dll not found

2014-10-28 Thread massimo.signori
Joe Mistachkin-3 wrote > The upcoming release of System.Data.SQLite (1.0.91.0, due out Feb 10th) > may work better in your case because of recent changes to the native > library pre-loading feature that strongly favor the location of the > System.Data.SQLite assembly itself. Hi Joe, the new

Re: [sqlite] Access Temp Tables/Views in background thread

2014-10-28 Thread Kees Nuyt
On Mon, 27 Oct 2014 21:53:59 -0700, Balance On I wrote: > Hi All, > > I have an application where I create a temp table/view in one thread. I > then try to perform some operations in background and I don’t have access > to those temp objects. I thought that those were

Re: [sqlite] Access Temp Tables/Views in background thread

2014-10-28 Thread Stephen Chrzanowski
As mentioned, temp tables are connection based, not database based. I can think of two ways of getting around this. Expose your child thread database object to your main thread. Then have your main thread do what it needs to do with it. I wouldn't entirely recommend this as it breaks scope,

Re: [sqlite] Keeping -wal and -shm files

2014-10-28 Thread James K. Lowden
On Mon, 27 Oct 2014 17:41:53 +0100 Steinar Midtskogen wrote: > "James K. Lowden" writes: > > > See -o grpid in mount(8). I think that's what you want. > > Thanks. It works! Hmm, I'm glad, but as David Woodhouse pointed out, it shouldn't

Re: [sqlite] Table qualification not supported in some cases (was: quasi-bug related to locking, and attached databases)

2014-10-28 Thread Gerry Snyder
Some further comments on VIEWs: A regular (non TEMPORARY) VIEW can reference only tables in the file where it is stored. SQLite allows qualified names, but the practice should be avoided because the VIEW won't work if the file is attached under a different name. A TEMPORARY VIEW can

Re: [sqlite] Keeping -wal and -shm files

2014-10-28 Thread Steinar Midtskogen
"James K. Lowden" writes: > and -o grpid changes the directory's *gid* effect, not setgid. Are you > sure that the directory is setgid? > > $ ls -ld steinar > drwxrwxr-x 2 jklowden wheel 512 Oct 28 09:54 steinar > $ chmod 2775 steinar > $ ls -ld steinar >

Re: [sqlite] Table qualification not supported in some cases (was: quasi-bug related to locking, and attached databases)

2014-10-28 Thread Stephan Beal
On Tue, Oct 28, 2014 at 4:02 PM, Gerry Snyder wrote: > A regular (non TEMPORARY) VIEW can reference only tables in the file where > it is stored. SQLite allows qualified names, but the practice should be > avoided because the VIEW won't work if the file is attached under

[sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
Hi, After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. For example the following query with 3.8.6 will give me an ordered string of items.image values based on items.position (which contains integers): SELECT products.name,

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Simon Slavin
On 28 Oct 2014, at 7:33pm, James Earl wrote: > After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to > order group_concat values by using a subselect. Sorry, but as the documentation says "The order of the

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Nico Williams
On Tue, Oct 28, 2014 at 2:33 PM, James Earl wrote: > After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to > order group_concat values by using a subselect. For example the > following query with 3.8.6 will give me an ordered string of > items.image values

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
On Tue, Oct 28, 2014 at 1:43 PM, Simon Slavin wrote: > > On 28 Oct 2014, at 7:33pm, James Earl wrote: > >> After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to >> order group_concat values by using a subselect. > > Sorry, but as the

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Clemens Ladisch
James Earl wrote: > After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to > order group_concat values by using a subselect. For example the > following query with 3.8.6 will give me an ordered string of > items.image values based on items.position (which contains integers): > >

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
On Tue, Oct 28, 2014 at 1:50 PM, Clemens Ladisch wrote: > Joining typically involves reordering rows. You were lucky in 3.8.6. > > You have to order the result of the join before grouping: > > SELECT product_name, >GROUP_CONCAT(item_image) AS item_images > FROM

[sqlite] problem trigger

2014-10-28 Thread pablo Van
CREATE TRIGGER [Before_Insertion_Task_on_Scheduler] BEFORE INSERT ON [Scheduler] FOR EACH ROW WHEN new.DiaHs_Inicio not between (old.DiaHs_Inicio and old.DiaHs_Fin); --Insert into Scheduler values(new.Id_Tarea,new.DiaHs_Inicio,new.DiaHs_Fin,new.Estado); BEGIN select RAISE (ROLLBACK,"El nuevo

Re: [sqlite] problem trigger

2014-10-28 Thread Simon Slavin
On 28 Oct 2014, at 8:06pm, pablo Van wrote: > WHEN new.DiaHs_Inicio not between (old.DiaHs_Inicio and old.DiaHs_Fin) I do not think SQLite supports NOT BETWEEN. I would change it to something like WHEN (new.DiaHs_Inicio < old.DiaHs_Inicio) OR (new.DiaHs_Inicio >

Re: [sqlite] problem trigger

2014-10-28 Thread Richard Hipp
On Tue, Oct 28, 2014 at 4:11 PM, Simon Slavin wrote: > > On 28 Oct 2014, at 8:06pm, pablo Van wrote: > > > WHEN new.DiaHs_Inicio not between (old.DiaHs_Inicio and old.DiaHs_Fin) > > I do not think SQLite supports NOT BETWEEN. > It does. See

[sqlite] sqlite3.c in a library - api rename

2014-10-28 Thread Ward Willats
Hello. I am using the amalgamation in a C++ library statically linked into other people's applications. Is there a way to namespace and/or macro and/or let C++ do its name-mangling thing to all the identifiers (by running the CPP compiler and turning __cplusplus off) so only my library

Re: [sqlite] sqlite3.c in a library - api rename

2014-10-28 Thread Richard Hipp
On Tue, Oct 28, 2014 at 11:18 PM, Ward Willats wrote: > Hello. > > I am using the amalgamation in a C++ library statically linked into other > people's applications. > > Is there a way to namespace and/or macro and/or let C++ do its > name-mangling thing to all the

Re: [sqlite] sqlite3.c in a library - api rename

2014-10-28 Thread Ward Willats
> On Oct 28, 2014, at 8:23 PM, Richard Hipp wrote: > > On Tue, Oct 28, 2014 at 11:18 PM, Ward Willats > wrote: > >> Hello. >> >> I am using the amalgamation in a C++ library statically linked into other >> people's applications. >> >> Is there a way