Re: [sqlite] Upsert inside trigger?

2019-06-16 Thread Darren Duncan
On 2019-06-16 6:11 a.m., Adrian Ho wrote: From https://sqlite.org/lang_createtrigger.html : *Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers* [...] * Common table expression are not supported for statements inside of triggers. I wonder what the reason

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-06-16 Thread Jose Isaias Cabrera
Dr. Richard Hipp, on Monday, April 29, 2019 09:18 AM, wrote...​ > On 4/29/19, Jose Isaias Cabrera wrote:​ > >​ > > I know I can probably use cygwin to run this tool, but plain Windows is not​ > > an option, right?​ > >​ > ​ > Althttpd is built around fork(). Windows does not support fork().​ >

Re: [sqlite] Understanding the WITH clause

2019-06-16 Thread Luuk
On 16-6-2019 19:32, E.Pasma wrote: Message to Luuk: thanks for explaining Pax vobiscum. E. Pasma Thanks for the recursive CTE. Luuk ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] SQLITE_MAX_COLUMN should be a runtime knob for Machine Learning

2019-06-16 Thread Simon Slavin
On 16 Jun 2019, at 7:54pm, Jens Alfke wrote: > As far as I know, there is no benefit to storing each element of such a > vector as a separate column in SQLite. Instead, the entire vector should be > stored as a single blob — for example, as a concatenation of 3072 IEEE floats > in some fixed

Re: [sqlite] Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-16 Thread Jens Alfke
> On Jun 12, 2019, at 8:28 AM, Richard Hipp wrote: > > That is already the case, and has been for 17 years. The question at > hand is what should SQLite do when the application asks it to convert > a -0.0 value into text. IMHO, any application code that outsources numeric/text conversions to

Re: [sqlite] SQLITE_MAX_COLUMN should be a runtime knob for Machine Learning

2019-06-16 Thread Simon Slavin
On 16 Jun 2019, at 7:35pm, Amirouche Boubekki wrote: > Isn't this a use-case of LSM extension? It would seem a very good thing to do using LSM, but I can find documentation for LSM only in SQLite4, not SQLite3. I did find this: " I've had the

Re: [sqlite] SQLITE_MAX_COLUMN should be a runtime knob for Machine Learning

2019-06-16 Thread Jens Alfke
> On Jun 15, 2019, at 6:42 AM, Dan Kaminsky wrote: > > One of the more useful and usable packages for Natural Language > Processing, Magnitude[1], leverages SQLite to efficiently handle the real > valued but entirely abstract collections of numbers -- vector spaces -- > that modern machine

Re: [sqlite] SQLITE_MAX_COLUMN should be a runtime knob for Machine Learning

2019-06-16 Thread Amirouche Boubekki
Le sam. 15 juin 2019 à 20:29, Simon Slavin a écrit : > On 15 Jun 2019, at 2:42pm, Dan Kaminsky wrote: > > [about the 32676 hard limit on the number of columns in a table] > > > I spent quite a bit of time hacking large column support into a working > > Python pipeline, and I'd prefer never to

Re: [sqlite] Understanding the WITH clause

2019-06-16 Thread E.Pasma
> Op 15 jun. 2019, om 19:20 heeft Sam Carleton het > volgende geschreven: > > I have kept reading and the next section of the book does away with the > update and simply creates a recursive function. The goal of the function > is to determine the 'weight' of a part by adding up all the

Re: [sqlite] json path escaping with double quote

2019-06-16 Thread gwenn
$ make quicktest is ok with the patch. I will try to provide some additional test cases. On Sat, Jun 15, 2019 at 10:37 AM gwenn wrote: > > Ok, > I tried to patch this line: > > diff --git a/ext/misc/json1.c b/ext/misc/json1.c > index d99d360b2..0bb4e1cee 100644 > --- a/ext/misc/json1.c > +++

Re: [sqlite] SQLITE_MAX_COLUMN should be a runtime knob for Machine Learning

2019-06-16 Thread Dan Kaminsky
As it happens, there is in fact a formal analytical technique that yields appropriate numbers of "well normalized" dimensions for word embeddings: https://github.com/ziyin-dl/word-embedding-dimensionality-selection

Re: [sqlite] How to set access permissions to protect a database file?

2019-06-16 Thread Peter da Silva
I don't believe you are providing any protection against editing the file, just deleting. On Sun, Jun 9, 2019, 4:38 PM Markos wrote: > Many thanks to Luuk, Adrian, Graham, James, Simon, Richard and Peter, > > To guarantee "some" protection to the files containing the database I > decided to use

Re: [sqlite] Upsert inside trigger?

2019-06-16 Thread ingo
On 16-6-2019 15:11, Adrian Ho wrote: > Common table expression are not supported for statements inside of > triggers. Ah, I searched the docs for 'upsert', 'with' ... Thanks. ingo ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Upsert inside trigger?

2019-06-16 Thread Adrian Ho
On 16/6/19 8:37 PM, ingo wrote: > Upon creation, the trigger below gives a syntax error near INSERT. > Without the trigger surrounding it, the query works well. > The docs give me no clue to what goes wrong. From https://sqlite.org/lang_createtrigger.html : *Syntax Restrictions On UPDATE,

[sqlite] Upsert inside trigger?

2019-06-16 Thread ingo
Upon creation, the trigger below gives a syntax error near INSERT. Without the trigger surrounding it, the query works well. The docs give me no clue to what goes wrong. Ingo ---%<--%<--%<--- CREATE TRIGGER IF NOT EXISTS update_balances AFTER INSERT ON journal BEGIN WITH