Re: [sqlite] Bug? INSERT OR REPLACE not equivalent to DELETE followed by INSERT

2018-03-22 Thread Peter Michaux
nly attempts the UPDATE if the row already existed? That would at least move the bulky code out of the application and into the database. Also it seems it would be more efficient. Thanks. Peter Peter On Wed, Mar 21, 2018 at 6:15 PM, Kees Nuyt wrote: > On Wed, 21 Mar 2018 14:05:07 -0700

Re: [sqlite] Bug? INSERT OR REPLACE not equivalent to DELETE followed by INSERT

2018-03-21 Thread Peter Michaux
> The fact that there's a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > > > >-Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of Peter Michaux >

Re: [sqlite] Bug? INSERT OR REPLACE not equivalent to DELETE followed by INSERT

2018-03-16 Thread Peter Michaux
27;s a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > > > >-Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of Peter Michaux > >Sent: Monday, 12 M

[sqlite] Bug? INSERT OR REPLACE not equivalent to DELETE followed by INSERT

2018-03-12 Thread Peter Michaux
Hi, I have read that INSERT OR REPLACE is equivalent to a DELETE followed by an INSERT. I came across a case where that is not true. Set up a test case $ rm -f asdf.sqlite && sqlite3 asdf.sqlite sqlite> .mode columns sqlite> .headers on sqlite> PRAGMA foreign_keys=OFF; sqli

[sqlite] How sqlite works? Parsing SQL ect

2006-11-07 Thread Peter Michaux
Hi, I would like to build a very light SQL database in javascript. I would like to learn how sqlite parses an SQL statement and then acts on this parsed information. Does anyone have a pointer to a link or book that explains the process at a higher level then source code? Thank you, Peter -