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

2018-01-16 Thread Simon Slavin
On 16 Jan 2018, at 2:25pm, Richard Hipp wrote: > On 1/16/18, Paul Sanderson wrote: > >> That terminal app is still sandboxed. AFAIAA you essentially get access to >> the applictaios data folder and you can add, create, delete, etc files >> within

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

2018-01-16 Thread Richard Hipp
On 1/16/18, Paul Sanderson wrote: > That terminal app is still sandboxed. AFAIAA you essentially get access to > the applictaios data folder and you can add, create, delete, etc files > within it. Right. And so it is apparently not possible to compile a

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

2018-01-16 Thread Dominique Devienne
On Tue, Jan 16, 2018 at 10:51 AM, Paul Sanderson < sandersonforens...@gmail.com> wrote: > That terminal app is still sandboxed. AFAIAA you essentially get access to > the application's data folder and you can add, create, delete, etc files > within it. > Sounds good enough, no? But really, what

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

2018-01-16 Thread Paul Sanderson
That terminal app is still sandboxed. AFAIAA you essentially get access to the applictaios data folder and you can add, create, delete, etc files within it. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786

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

2018-01-16 Thread John G
I've not tried it, but this article from OSXdaily says you can get the command line (Terminal) in iOS. http://osxdaily.com/2018/01/08/get-terminal-app-ios-command-line/ That probably does not solve the fork requirement, and I'm sure it is sandboxed. John G On 15 January 2018 at 15:00,

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

2018-01-15 Thread petern
>Are you the developer / maintainer of the SQLite shell? THE developer is D Richard Hipp. He is the decisionmaker and principal developer of the SQLite releases originated from sqlite.org. For all practical purposes, that is the official release. On the other hand, because of the open license,

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

2018-01-15 Thread Peter Da Silva
I would have thought that the logical platform-independent scripting language to use with sqlite would be tcl. By default tcl comes with sqlite built in, so you don’t even need to compile anything. ___ sqlite-users mailing list

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

2018-01-15 Thread Simon Slavin
On 15 Jan 2018, at 3:33pm, J Decker wrote: > But; dropbear ssh sometimes works? Some have issues making it work > so a shell is possible; they just don't have a termianl in the store? > Would be a pretty limited userbase You can install a GUI program to telnet/ssh /out/

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

2018-01-15 Thread J Decker
But; dropbear ssh sometimes works? Some have issues making it work so a shell is possible; they just don't have a termianl in the store? Would be a pretty limited userbase On Mon, Jan 15, 2018 at 7:00 AM, Richard Hipp wrote: > On 1/15/18, Shane Dev

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

2018-01-15 Thread Richard Hipp
On 1/15/18, Shane Dev wrote: > > Did the Apple engineers tell you why it is not possible to compile and run > the SQLite shell on iOS? > You cannot get a command-line prompt on iOS, and the SQLite shell requires a command-line prompt (like bash). If i understand correctly,

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

2018-01-15 Thread Shane Dev
Interesting. SQLite is written in ANSI C. Objective-C is a strict superset of ANSI C. Objective-C can be used to write software for OS X and iOS. Did the Apple engineers tell you why it is not possible to compile and run the SQLite shell on iOS? On 15 January 2018 at 02:16, Richard Hipp

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

2018-01-15 Thread Shane Dev
Sorry, false alarm, the text is correct On 15 January 2018 at 13:36, Shane Dev wrote: > Hi Simon, > > .selftest looks interesting > > I think there is a typo in section 13 - > > The .selftest command reads the rows of the selftest table in selftest.tno > order. > > On 15

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

2018-01-15 Thread Shane Dev
Hi Simon, .selftest looks interesting I think there is a typo in section 13 - The .selftest command reads the rows of the selftest table in selftest.tno order. On 15 January 2018 at 12:06, Simon Slavin wrote: > > > On 15 Jan 2018, at 10:08am, Shane Dev

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

2018-01-15 Thread Simon Slavin
On 15 Jan 2018, at 10:08am, Shane Dev wrote: > Ideally, I would like to execute a series of "test cases" from within the > SQLite shell without dependency on an external scripting language. These > would not normally be executed by the application end user. Commands

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

2018-01-15 Thread Shane Dev
Hi Peter, Ideally, I would like to execute a series of "test cases" from within the SQLite shell without dependency on an external scripting language. These would not normally be executed by the application end user. Initially, I planned to implement this with triggers but I see now that the

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

2018-01-14 Thread Richard Hipp
On 1/14/18, Simon Slavin wrote: > > I’ve never seen anyone compile sqlite3 (the shell tool) for iOS. Android I > have even less idea about. Can you run command-line tools on Android ? Has > anyone compiled sqlite3 for it ? > You can easily compile and run all of the

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

2018-01-14 Thread Brian Curley
I use Termux on Android. Very useful build of sqlite available there. Regards. Brian P Curley On Jan 14, 2018 7:42 PM, "Simon Slavin" wrote: > > > On 15 Jan 2018, at 12:30am, petern wrote: > > > Shane. That's very interesting considering

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

2018-01-14 Thread Simon Slavin
On 15 Jan 2018, at 12:30am, petern wrote: > Shane. That's very interesting considering the effort to make the one > thing happen exactly once without external software dependency. On 13 Jan 2018, at 7:33pm, Shane Dev wrote: > I use mainly

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

2018-01-14 Thread petern
Shane. That's very interesting considering the effort to make the one thing happen exactly once without external software dependency. Does the capability to write specially named local files but not have a periodic loop nor network capability somehow get your application off the ground? Based on

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

2018-01-14 Thread Simon Slavin
On 14 Jan 2018, at 10:33pm, Shane Dev wrote: > I have found a way achieve this purely in the SQLite shell. The trick is to > make all rows in tcout1 SQL statements and then execute them. That’s clever. Nice one. Simon. ___

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

2018-01-14 Thread Tony Papadimitriou
You can use .output file and .print for most cases (except those that need a calculated result) to simplify your script a bit. -Original Message- From: Shane Dev I have found a way achieve this purely in the SQLite shell. The trick is to make all rows in tcout1 SQL statements and

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

2018-01-14 Thread Shane Dev
Hi Simon, I have found a way achieve this purely in the SQLite shell. The trick is to make all rows in tcout1 SQL statements and then execute them. sqlite> CREATE TABLE tcout1(sql text); sqlite> CREATE TABLE tcout2(sql text); sqlite> insert into tcout1(sql) select "insert into tcout2(sql) select

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(

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

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] 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?

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] 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] 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