Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Simon Slavin
On 13 Dec 2019, at 9:16am, Sascha Ziemann wrote: > returns just the second Works fine for me in SQLite version 3.28.0 2019-04-15 14:49:49 Have you tried it in the SQLite command-line tool ? ___ sqlite-users mailing list

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Keith Medcalf
On Friday, 13 December, 2019 02:16, Sascha Ziemann wrote: >I have a problem to find rows in a database when I write in hex notation: >CREATE TABLE LOG (MSG VARCHAR(6291456) NOT NULL); >INSERT INTO LOG VALUES

[sqlite] SQLite overload help

2019-12-13 Thread Pedro Batista
I have created a custom function (aux), I'm able to load it via load_extension() on shell. Now I'm trying to overload a function for a Virtual Table (fts3 or fts5) These what I know: need to hit sqlite3_overload_function which uses the xFindFunction() that goes back to `fts3FindFunctionMethod` I

[sqlite] System.Data.SQLite.Core and Core-Linux version Mismatch [nuget]

2019-12-13 Thread Jonathon Koyle
When trying to install the current stable NuGet of System.Data.SQLite.Core I get the following error: Error Unable to resolve dependencies. 'System.Data.SQLite.Core 1.0.112' is not compatible with 'System.Data.SQLite.Core-Linux 1.0.110 constraint: System.Data.SQLite.Core (= 1.0.110)'. As I

[sqlite] Difference between hex notation and string notation

2019-12-13 Thread Sascha Ziemann
I have a problem to find rows in a database when I write in hex notation: CREATE TABLE LOG (MSG VARCHAR(6291456) NOT NULL); INSERT INTO LOG VALUES (X'666163696c6974793d6461656d6f6e3b636f6d706f6e656e743d6e616d65643b746578743d7368757474696e6720646f776e'); INSERT INTO LOG VALUES

[sqlite] Persisting Database Lock Issue

2019-12-13 Thread 고예찬
Hello, I am experiencing `database is locked` error. I wonder if anyone has gone through or resolved similar issue. To illustrate, I have a .db file with below settings: ``` PRAGMA journal_mode=WAL; PRAGMA wal_autocheckpoint=128; PRAGMA journal_size_limit=0; ``` and I run two programs in python -

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Gerry Snyder
I would suggest that if you ran: SELECT ROWID,MSG,typeof(MSG) FROM LOG; and read https://sqlite.org/datatype3.html you would have a better idea of what is going on. You might still consider it a but, but it is expected behavior. Gerry On Fri, Dec 13, 2019 at 8:51 AM Sascha Ziemann wrote: >

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Jose Isaias Cabrera
Sascha Ziemann, on Friday, December 13, 2019 04:16 AM, wrote... > > I have a problem to find rows in a database when I write in hex notation: > > CREATE TABLE LOG (MSG VARCHAR(6291456) NOT NULL); > INSERT INTO LOG VALUES > >

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Jose Isaias Cabrera
Yeah, mine was vanilla compiled, sqlite> pragma compile_options; COMPILER=gcc-5.2.0 ENABLE_DBSTAT_VTAB ENABLE_FTS3 ENABLE_FTS5 ENABLE_JSON1 ENABLE_RTREE ENABLE_STMTVTAB ENABLE_UNKNOWN_SQL_FUNCTION THREADSAFE=0 sqlite> From: sqlite-users on behalf of David

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread David Raymond
Run... pragma compile_options; ...and see if LIKE_DOESNT_MATCH_BLOBS is in the list that comes up. If it is NOT in the list then both rows will show up. This is the case for the precompiled Windows cli for example. If it IS in the list, then only the second one that was inserted as text will

Re: [sqlite] System.Data.SQLite.Core and Core-Linux version Mismatch [nuget]

2019-12-13 Thread Joe Mistachkin
There doesn’t appear to be a NuGet package named “System.Data.SQLite.Core-Linux” that I can see. I don’t fully understand what the issue is here; however, in general, all versions must match up. Also, the System.Data.SQLite.Core package should contain a native binary usable on Linux x64.

Re: [sqlite] Coding standard

2019-12-13 Thread Jens Alfke
—Jens > On Dec 12, 2019, at 11:23 AM, Warren Young wrote: > > I wouldn’t dismiss this warning I wouldn’t dismiss a warning about the full scenario. (In fact I wasn’t aware that assignment to a field might overwrite pad bytes; that’s good to know.) But warning about every call to memset is

Re: [sqlite] Slightly offtopic: indexes vs. hash tables

2019-12-13 Thread Jens Alfke
Thank you, Simon. That was an interesting article, and even better, it has a link to a book-length PDF of “Modern B-Tree Techniques” that is *solid gold*. I’ve been wanting to learn more about b-trees, indexing, query planning, etc. and this book goes way beyond anything I’ve found previously.

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Simon Slavin
On 14 Dec 2019, at 12:16am, František Kučera wrote: > In case of my software I can really expect that all values in a column will > have the same type or be NULL (and everything else means error). In that case, execute your query and use sqlite3_column_type() on each column of the first row

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Keith Medcalf
On Friday, 13 December, 2019 18:35, Richard Damon wrote: >One big thing to watch out is that columns of NUMERIC type can easily >return values of either INTEGER or REAL type. Your single type >expectation is easily broken here. I also don't know if >9223372036854775807 (the biggest integer

[sqlite] How to determine the column type?

2019-12-13 Thread František Kučera
Hello, I know that SQLite uses dynamic types, so it is not easy… But what is the best way to determine the column type of a result set? The sqlite3_column_decltype() works only if I select directly a column, but not when I do some other operations (call function, increment etc.). The

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Richard Damon
On 12/13/19 5:49 PM, František Kučera wrote: > Hello, > > I know that SQLite uses dynamic types, so it is not easy… But what is the > best way to determine the column type of a result set? > > The sqlite3_column_decltype() works only if I select directly a column, but > not when I do some other

[sqlite] Typo in docs

2019-12-13 Thread Adam Levy
The documentation for PRAGMA schema_version has a small grammar error in the first sentence: "The schema_version pragma will to get or set the value of the schema-version integer at offset 40 in the database header. " Note the "will to get or set". The "to" should be removed. Thanks Adam

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Keith Medcalf
On Friday, 13 December, 2019 15:49, František Kučera wrote: >I know that SQLite uses dynamic types, so it is not easy… But what is the >best way to determine the column type of a result set? Result sets do not have "column types". Each result value (the intersection of row and column) has a

Re: [sqlite] How to determine the column type?

2019-12-13 Thread František Kučera
Dne 14. 12. 19 v 0:09 Keith Medcalf napsal(a): > On Friday, 13 December, 2019 15:49, František Kučera > wrote: > >> I know that SQLite uses dynamic types, so it is not easy… But what is the >> best way to determine the column type of a result set? > Result sets do not have "column types". Each

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Richard Damon
On 12/13/19 7:16 PM, František Kučera wrote: > Dne 14. 12. 19 v 0:09 Keith Medcalf napsal(a): >> On Friday, 13 December, 2019 15:49, František Kučera >> wrote: >> >>> I know that SQLite uses dynamic types, so it is not easy… But what is the >>> best way to determine the column type of a result