[sqlite] Option to control implicit casting

2019-04-08 Thread Joshua Thomas Wise
SQLite3 uses manifest typing, which is great and provides a ton of flexibility. However, due to implicit casting rules, many operations can accidentally result in a different value than what was desired. If programmers don’t guard against every possible cause of implicit casting, many error

[sqlite] Wildcard with path in json extension

2019-04-08 Thread Charles Leifer
Many of the sqlite json1 functions accept a path parameter, which the documents describe as: For functions that accept PATH arguments, that PATH must be well-formed or else the function will throw an error. A well-formed PATH is a text value that begins with exactly one '$' character followed by

Re: [sqlite] problem with CLI readfile() of zero-length files.

2019-04-08 Thread Richard Hipp
On 4/8/19, Donald Griggs wrote: > On my system, it appears that, > beginning with 3.27.0, attempting to use the (quite useful!) readfile() > function on a *zero-length* file throws "Error: out of memory" > whereas with 3.26.0, the result was set to null. Fixed by check-in

[sqlite] problem with CLI readfile() of zero-length files.

2019-04-08 Thread Donald Griggs
On my system, it appears that, beginning with 3.27.0, attempting to use the (quite useful!) readfile() function on a *zero-length* file throws "Error: out of memory" whereas with 3.26.0, the result was set to null. (Attempting to read a *non-existent* file on either version properly results in

[sqlite] Error in docs

2019-04-08 Thread Jim Dossey
I think I found an error in the documentation here: https://www.sqlite.org/datatype3.html#column_affinity_for_views_and_subqueries It defines the table and view: CREATE TABLE t1(a INT, b TEXT, c REAL); CREATE VIEW

Re: [sqlite] export tables

2019-04-08 Thread R Smith
On 2019/04/08 3:03 PM, Mohsen Pahlevanzadeh wrote: Hello, I need to export some tables with dot command, How I do it? That depends on what you mean by "export"? Do you wish to export the table structure (schema)? - in which case the dot commands can be used easily, or do you wish to

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-08 Thread Nik Jain
ok. I investigated further, and it seems my problem is something else entirely! A SCAN is being performed on a fts5 table. I am not sure but I think that means no index. Query plan: sqlite> explain query plan select * from productsfts p where p.attributes match '50'limit 6; QUERY PLAN

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-08 Thread Jose Isaias Cabrera
Wow! Thanks, JKL. You sent me back to school on this one. ;-) I had to go back and refresh the Venn diagram. :-) Thanks. Also, thanks for the time explaining it. I have to read it a few more times to really get it into my brains so that I don't keep asking the same questions. It would be

Re: [sqlite] export tables

2019-04-08 Thread Clemens Ladisch
Mohsen Pahlevanzadeh wrote: > I need to export some tables with dot command, How I do it? https://www.sqlite.org/cli.html#csv_export Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] export tables

2019-04-08 Thread Mohsen Pahlevanzadeh
Hello, I need to export some tables with dot command, How I do it? --regards Mohsen ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] Re: Query Regression IN and Virtual Tables - followup

2019-04-08 Thread Hick Gunter
Debugging shows that R6 is in fact initialised with the expected value 140001, so this seems to be a display problem only. Plus, it seems to be due to debugger interference, as executing from the SQLite shell does show the instruction. Tested by setting a breakpoint on the VColumn function and

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-08 Thread Wout Mertens
You need to create an index on both columns at once or the indexes can't be used. Try "EXPLAIN QUERY PLAN SELECT ...your query here" to see if indexes are being used. Wout. On Sun., Apr. 7, 2019, 9:41 a.m. Nik Jain wrote: > Have a fts5 table with 2 indexed columns. Where the idea is to match

Re: [sqlite] [EXTERNAL] Re: Remove row to insert new one on a full database

2019-04-08 Thread Hick Gunter
First, your rows are NOT "all the same size". SQLite uses a compressed format to store values that, among other things, uses less space for smaller integers. IIRC your records will be (values before colon are the "manifest", values after the colon are the "payload" of a record): (value is 0)

Re: [sqlite] [EXTERNAL] Prepared Statement Without a Database Instance

2019-04-08 Thread Hick Gunter
No. The schema is required to correctly compile the statement, and if the schema changes, then the statement needs to be recompiled. IOW: The schema, in the version as it existed at prepare time, is an integral part of the prepared statement. -Ursprüngliche Nachricht- Von: sqlite-users