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( condition ) {
    db.aggregate( "run", ( sql )=>{ db.do( sql ) } );
    db.do( `select run(sql) from commands where ${condition}` );
}
```

using npmjs.org/packages/sack.vfs


On Sat, Jan 13, 2018 at 5:11 PM, Brian Curley <bpcur...@gmail.com> wrote:

> 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 then adopt forward to others like Python, Node.js, whatever...
>
> Regards.
>
> Brian P Curley
>
>
>
> On Jan 13, 2018 4:18 PM, "Shane Dev" <devshan...@gmail.com> wrote:
>
> 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
> could be done in C/C++ on every target platform but I was hoping to avoid
> the complexities of the compiler toolchain and system programming languages
> at this stage.
>
> On 13 January 2018 at 21:09, Simon Slavin <slav...@bigfraud.org> wrote:
>
> >
> >
> > On 13 Jan 2018, at 7:54pm, Shane Dev <devshan...@gmail.com> 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>
> > >
> > > obviously the numeric part of the file name will change depending on
> the
> > > time of statement execution - or do I misunderstand your question?
> >
> > So the purpose of this is to find compose a filename which includes a
> > timestamp ?
> >
> > For prototype purposes you should be able to do this in whatever shell
> > you’re using to run the SQLite shell tool.  For real project uses you
> > should be doing it in whatever language your programming in, of course.
> >
> > You can’t use the SQLite shell tool for real project purposes on multiple
> > platforms.  It won’t run on many IoT devices, of course.
> >
> > Simon.
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to