Re: [sqlite] sqlite3_column_decltype and max and min

2018-01-13 Thread Igor Korot
Hi, On Sat, Jan 13, 2018 at 6:32 AM, Niall O'Reilly wrote: > > > On 11 Jan 2018, at 13:23, Richard Hipp wrote, in reply to John G > : > >> You can >> download and/or compile your own up-to-date SQLite that is twice as >> fast and has all the latest

[sqlite] Possible bug when adding "on delete cascade" via DB Browser for SQLite

2018-01-13 Thread Magnus Andersson
Today I used DB Browser for SQLite, version 3.10.1 on a windows 7 machine, and encountered what seems to be a bug, either in the SQLite browser or SQLite as such. If this is not the correct mailing list to post this in I apologize, just let me know. I had a table with foreign keys, and

Re: [sqlite] SQLite Application Server Concurrency

2018-01-13 Thread Dinu
James, You don't need to go all the length to creating a sqlite proxy RPC as has been suggested. Your service could implement one thing only - a lock to the database file (external to the SQLite locking mechanism, of course). So it only needs to serialize concurrency; the client does the RPC (via

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Simon Slavin
On 13 Jan 2018, at 7:54pm, Shane Dev wrote: > What do you mean by 'indirect phase'? Having to execute a command to find the command you want to execute. > The results of execution - > > sqlite> select '.once tc'||strftime('%s','now'); > .once tc1515872821 > sqlite> >

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Shane Dev
Hi Simion, What do you mean by 'indirect phase'? The results of execution - sqlite> select '.once tc'||strftime('%s','now'); .once tc1515872821 sqlite> obviously the numeric part of the file name will change depending on the time of statement execution - or do I misunderstand your question?

[sqlite] Documentation typo

2018-01-13 Thread J. King
In the following passage contains a typo ("crass" -> "crash"): Setting PRAGMA synchronous=OFF can cause the database to go corrupt if there is an operating-system crass or power failure... -- J. King

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Shane Dev
Yes, I want to create a timestamp in the file name. My goal is to test the prototype on at least Windows, Linux, iOS and Android. Of course this kind of string building is easily done in bash, powershell, python, etc but no single scripting environment is available on every target platform. It

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-13 Thread petern
Richard. As you are probably already aware, I forgot about the encoding column. An encoding (UTF8,UTF16,...) column would also needed for the PRAGMA function_list report to be the key for functions differing only by the encoding flag: https://sqlite.org/c3ref/create_function.html One final

[sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Shane Dev
Hello, I have a table of dot commands and SQL - sqlite> select sql from tcout1; sql .headers off select '.once tc'||strftime('%s','now'); --first execute this SQL statement and replace this line with its own result select * from tc; Is there a way to execute the contents of certain rows (the

Re: [sqlite] Possible bug when adding "on delete cascade" via DB Browser for SQLite

2018-01-13 Thread Chris Locke
DB Browser for SQLite is a third party product which just uses SQLite. Any support issues should be directed to their gitHub support page. https://github.com/sqlitebrowser/sqlitebrowser/issues To confirm whether its an issue in DB Browser for SQLite or SQLite itself, you can 'reproduce' the

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Simon Slavin
On 13 Jan 2018, at 7:33pm, Shane Dev wrote: > I use mainly Linux (bash) and Windows (powershell) but my target platforms > also include Android, iOS, IoT (anything that can link against the sqlite > library). At this stage, I am trying to prototype as much as possible

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-13 Thread petern
Single builtin functions that otherwise would have required two or more separate create_function calls should have two or more corresponding simulated entries for plain and aggregate flavors distinguishable by column values.max(A) aggregate and max(A,B,...) function could look something like

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Simon Slavin
On 13 Jan 2018, at 6:48pm, Shane Dev wrote: > Is there a way to execute the contents of certain rows (the second row in > this example) and replace it with its own result to create second table / > view which could interpreted by the sqlite shell? Not inside the SQLite

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Shane Dev
Hi Simon, I use mainly Linux (bash) and Windows (powershell) but my target platforms also include Android, iOS, IoT (anything that can link against the sqlite library). At this stage, I am trying to prototype as much as possible using only the SQLite shell. On 13 January 2018 at 19:57, Simon

Re: [sqlite] sqlite3_column_decltype and max and min

2018-01-13 Thread Niall O'Reilly
On 11 Jan 2018, at 13:23, Richard Hipp wrote, in reply to John G : > You can > download and/or compile your own up-to-date SQLite that is twice as > fast and has all the latest features. It may be more convenient to use the [Homebrew package

[sqlite] Defect: trivial cross join strips BLOB subtype

2018-01-13 Thread petern
sqlite> .v SQLite 3.22.0 2018-01-12 23:38:10 dec3ea4e4e6c4b1761ddc883a29eaa50dcd663ce6199667cc0ff82f7849d4f2a sqlite> WITH blob_tab AS (SELECT blob()blob) SELECT subtype(blob) FROM blob_tab; subtype(blob) 1 sqlite> WITH blob_tab AS (SELECT blob()blob), other_tab(i) AS (values (1)) SELECT

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread Brian Curley
Bash can be found on prettt much all of these platforms if you're only prototyping in the shell. Even Windows offers Cygwin, Git, and Msys2 versions of the bash shell and I've had good success in running these w SQLite. (I cannot speak for iOS and bash, but I'm sure there's an option...) You can

[sqlite] sqlite3_value_pointer() metadata is also stripped by trivial cross join. Defect:

2018-01-13 Thread petern
sqlite> .v SQLite 3.22.0 2018-01-12 23:38:10 dec3ea4e4e6c4b1761ddc883a29eaa50dcd663ce6199667cc0ff82f7849d4f2a sqlite> WITH pointer_tab AS (SELECT pointer()pointer) SELECT ispointer(pointer) FROM pointer_tab; ispointer(pointer) 1 sqlite> WITH pointer_tab AS (SELECT pointer()pointer), other_tab(i)

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-13 Thread J Decker
I could do it in node.js pretty easy 2 ways (I think). ``` var sack = require( "sack.vfs" ); var db = sack.Sqlite( "test.db" ); function type1( condition ) { db.do( `select sql from commands where ${db.escape(condition)}` ).forEach( record=>{ db.do( record.sql ) }` ); } function type2(