Re: [sqlite] Displaying hierarchical structure

2019-01-31 Thread Peter Johnson
some relevant links: http://dwhoman.com/blog/sql-transitive-closure.html http://charlesleifer.com/blog/querying-tree-structures-in-sqlite-using-python-and-the-transitive-closure-extension/ On Wed, 30 Jan 2019, 4:52 AM Bart Smissaert Working on an Android app and part of that is storing SQL in

Re: [sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Peter Johnson
The headers are present in all three queries you pasted. The first result shows two rows, the top row is the header. The other two results show 4 rows each, the top row of each is the header row. -P On Tue, 25 Dec 2018, 3:42 AM Luuk sqlite> .version > SQLite 3.26.0 > > sqlite> .headers on > >

[sqlite] Docs typo JSON1 @ 4.13

2018-09-19 Thread Peter Johnson
Hi, The JSON1 docs at https://www.sqlite.org/json1.html have a minor typo: Section 4.13. The json_each() and json_tree() table-valued functions atom ANY, -- value for primitive types, null for array & object > id INTEGER -- integer ID for this element > parent INTEGER, -- integer ID for the

Re: [sqlite] CASE and NULL

2018-07-05 Thread Peter Johnson
Can't you just use IFNULL to assign a default value? CASE IFNULL( x, -999 ) WHEN 1 THEN 11 WHEN 2 THEN 22 WHEN 3 THEN 33 WHEN 4 THEN 44 WHEN -999 THEN 55 ELSE 66 END On 5 July 2018 at 11:35, R Smith wrote: > On 2018/07/05 8:44 AM, Simon Slavin wrote: > >> On 5 Jul 2018, at 7:30am,

Re: [sqlite] FTS4 content table

2018-07-02 Thread Peter Johnson
some new concepts that are unique to that module and so those nonconanical patterns cause people to make their own assumptions regarding how they are implemented, which was the case here. Thanks again. - Peter On Mon, 2 Jul 2018, 10:02 AM Dan Kennedy, wrote: > On 07/01/2018 05:20 PM, Peter John

Re: [sqlite] FTS4 content table

2018-07-01 Thread Peter Johnson
I recall you must still enumerate the column names of the fields you wish to link to the contentless table when creating the virtual table. If I remember correctly, failing to do so will result in 'no such column' errors. Last time I looked at the docs I got caught with the same gotcha, the docs

Re: [sqlite] Check if the new table has been created

2018-06-20 Thread Peter Johnson
Is it possible to create a trigger on sqlite_master which calls a user-defined function AFTER INSERT? That would avoid having to poll, but it'd still allow the application to be notified when the schema changed. On 19 June 2018 at 20:56, Richard Hipp wrote: > On 6/19/18, Igor Korot wrote: > >

Re: [sqlite] Issue with node-sqlite3

2018-06-13 Thread Peter Johnson
Hi Omer, Unfortunately what you are trying to do it not possible. You are trying to run the npm package `node-sqlite3` in an Angular project. Angular is a front-end, browser-based framework. The npm package manager contains javascript modules which can sometimes be used either in the browser

[sqlite] query planning - covering indices

2018-05-16 Thread Peter Johnson
I noticed that the query planner favours the primary index when a covering index exists which can satisfy the same query. My understanding is that covering indices are more efficient, as the table itself does not need to be scanned when all the required columns exist in the covering index? Is it

Re: [sqlite] Mac OS X name mangling

2007-12-03 Thread Peter Johnson
at, that's the confirmation I was hoping for! Thanks. Please also note that "thread safe" is an oxymoron. :-) I hear that. --Peter Johnson [EMAIL PROTECTED]

Re: [sqlite] Mac OS X name mangling

2007-11-30 Thread Peter Johnson
__DARWIN__, that prevents it from setting _XOPEN_SOURCE, which the comments say are "Needed to enable pthread recursive mutexes" On Nov 30, 2007, at 1:48 PM, Peter Johnson wrote: On Nov 30, 2007, at 1:32 PM, [EMAIL PROTECTED] wrote: Peter Johnson <[EMAIL PROTECTED]> wro

Re: [sqlite] Mac OS X name mangling

2007-11-30 Thread Peter Johnson
On Nov 30, 2007, at 1:32 PM, [EMAIL PROTECTED] wrote: Peter Johnson <[EMAIL PROTECTED]> wrote: I'm running into a problem building SQLite 3.5.1 targeting a minimum of Mac OS X 10.3, but building against the 10.4 (Universal) SDK. I think this issue has been addressed in 3.5.3. Have you

[sqlite] Mac OS X name mangling

2007-11-30 Thread Peter Johnson
any experience with this, or any suggestions? --Peter Johnson [EMAIL PROTECTED] This email is PRIVILEGED AND CONFIDENTIAL to Zattoo Inc.