Re: [sqlite] CASE and NULL

2018-07-04 Thread Simon Slavin
On 5 Jul 2018, at 6:22am, Andy Goth wrote: > Or equivalently, "ISNULL" instead of "IS NULL". There is no ISNULL in sqlite3. Also, the functions ifnull() and nullif() are not useful for actually testing for NULL. Continuing to eliminate options, regular expressions do not match with NULL in

[sqlite] CASE and NULL

2018-07-04 Thread Andy Goth
I'd like to use CASE to compare an expression x against a number of candidate values. That's the typical use for "CASE x WHEN", which avoids repeating x for each condition. The trouble is that one of the possible values is NULL, yet the comparison against each candidate value is done with

Re: [sqlite] Automatic numbering

2018-07-04 Thread Cecil Westerhof
2018-07-05 5:37 GMT+02:00 Simon Slavin : > On 5 Jul 2018, at 3:22am, Cecil Westerhof wrote: > > > I only want to store a date with a record. But it is possible that more > as > > one record will be inserted, so I want to use another field to use as an > > index. So that the first gets an one,

Re: [sqlite] Automatic numbering

2018-07-04 Thread Simon Slavin
On 5 Jul 2018, at 3:22am, Cecil Westerhof wrote: > I only want to store a date with a record. But it is possible that more as > one record will be inserted, so I want to use another field to use as an > index. So that the first gets an one, the second a two, etc. > Is this possible, or do I just

[sqlite] Automatic numbering

2018-07-04 Thread Cecil Westerhof
I only want to store a date with a record. But it is possible that more as one record will be inserted, so I want to use another field to use as an index. So that the first gets an one, the second a two, etc. Is this possible, or do I just have to check if there is already a date and fetch the

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Richard Hipp
On 7/4/18, Wojtek Mamrak wrote: > Creating a separate connection for the SELECTs does not seem to solve > the problem. What is the preferred way of tackling such a scenario? I > guarded all the calls with a mutex, but it did not help. The change was a bug fix. Any write to an r-tree might cause

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Wojtek Mamrak
Actually, there might be some unreset SELECT while inserting new records. I will investigate how to ensure it is not the case. Thanks for help! czw., 5 lip 2018 o 02:10 Wojtek Mamrak napisał(a): > > Yes. Yes. > czw., 5 lip 2018 o 00:28 Simon Slavin napisał(a): > > > > > > > > On 4 Jul 2018, at

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Wojtek Mamrak
Yes. Yes. czw., 5 lip 2018 o 00:28 Simon Slavin napisał(a): > > > > On 4 Jul 2018, at 11:03pm, Wojtek Mamrak wrote: > > > Creating a separate connection for the SELECTs does not seem to solve > > the problem. What is the preferred way of tackling such a scenario? I > > guarded all the calls with

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Simon Slavin
On 4 Jul 2018, at 11:03pm, Wojtek Mamrak wrote: > Creating a separate connection for the SELECTs does not seem to solve > the problem. What is the preferred way of tackling such a scenario? I > guarded all the calls with a mutex, but it did not help. Do you actually need to make changes while

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Wojtek Mamrak
Creating a separate connection for the SELECTs does not seem to solve the problem. What is the preferred way of tackling such a scenario? I guarded all the calls with a mutex, but it did not help. śr., 4 lip 2018 o 19:34 Wojtek Mamrak napisał(a): > > That is the case, thank you! > śr., 4 lip 2018

Re: [sqlite] Idea: defining table-valued functions directly in SQL

2018-07-04 Thread Andy Goth
Revisiting this topic... On 06/10/18 08:04, sql...@zzo38computer.org wrote: * Perhaps move PARAMETERS before AS, which may make the syntax easier. Like so? CREATE VIEW double PARAMETERS (arg) AS SELECT arg * 2; SELECT * FROM numbers, double(x); This is a readability improvement because

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Wojtek Mamrak
That is the case, thank you! śr., 4 lip 2018 o 18:15 Dan Kennedy napisał(a): > > On 07/04/2018 11:06 PM, Wojtek Mamrak wrote: > > Hello, > > > > I have encountered a significant change in behavior between versions > > 3.24 and 3.23. > > I have compiled SQLite using msvc 15.7.4 with

Re: [sqlite] 3.24 database table is locked

2018-07-04 Thread Dan Kennedy
On 07/04/2018 11:06 PM, Wojtek Mamrak wrote: Hello, I have encountered a significant change in behavior between versions 3.24 and 3.23. I have compiled SQLite using msvc 15.7.4 with SQLITE_THREADSAFE and I am setting threading mode option to SQLITE_CONFIG_SERIALIZED before initializing SQLite.

[sqlite] 3.24 database table is locked

2018-07-04 Thread Wojtek Mamrak
Hello, I have encountered a significant change in behavior between versions 3.24 and 3.23. I have compiled SQLite using msvc 15.7.4 with SQLITE_THREADSAFE and I am setting threading mode option to SQLITE_CONFIG_SERIALIZED before initializing SQLite. I have a single database connection handle

Re: [sqlite] [EXTERNAL] documentation for sqlite3_index_info-ídxStr typo.

2018-07-04 Thread Hick Gunter
Indeed SQLite does not care about what the VT implementations xBestIndex routine stuffs in there, as long as the xFilter routine can handle it. AFA SQLite is concerned, this is an opaque value of pointer size. -Ursprüngliche Nachricht- Von: sqlite-users

[sqlite] (no subject)

2018-07-04 Thread Roy Piter
___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] documentation for sqlite3_index_info-ídxStr typo.

2018-07-04 Thread Ben Manashirov
https://www.sqlite.org/c3ref/index_info.html Instead of referring to idxStr there is text that talks about idxPtr. It should mention if idxStr must point to a valid string or can it point to arbitrary data. If the latter than idxStr type should change to void* perhaps. Reading this doc it sounds