Re: [sqlite] (dot) commands will execute from sqlite command line but not from query
On 12/31/16, Paul Lambert wrote: > > Issue 2. No matter how I mix the use of .system in a trigger I cannot get > the syntax checker to allow for (dot) functions .system or .shell to > work. I know there is a qualifier about where the (dot) functions are > parsed but I have successfully used other (dot) functions in a trigger. > Triggering external applications on database events is a critical function. The dot-commands are implemented by the command-line shell program. But triggers are run by the core SQLite library. So there is no way for a trigger to run a dot-command. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (dot) commands will execute from sqlite command line but not from query
On 31 Dec 2016, at 7:55pm, Paul Lambert wrote: > Issue 2. No matter how I mix the use of .system in a trigger I cannot get > the syntax checker to allow for (dot) functions .system or .shell to > work. Dot functions are not part of SQLite. They are handled directly by the command-line tool. The SQLite API does not understand them. Sorry. If you need to call a system command directly from SQLite you will need to implement your own external function. Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] (dot) commands will execute from sqlite command line but not from query
On Linux with sqlite 3.13.0 installedI have successfully invoked the (dot) commands .system and .shell. Below are the results. In both instances the application at the target location launched as expected. (Ignore the Gtk message as it relates to the modal dialog box employed in the the application) sqlite> .system /home/EB30750/Documents/Provox/deltvImport Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. System command returns 65280 sqlite> sqlite> .shell /home/EB30750/Documents/Provox/deltvImport Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. System command returns 65280 sqlite> Issue 1: Both of these commands wait for the external program to exist before returning. Typically, where there are two versions, one will return without waiting for the child process to terminate and the other one will wait. I see these two functions as the same as the .system function can invoke the shell this way .system /usr/sh echo 'hello world' Or .system C:\ *Windows*\System32\cmd type 'hello world' Might want to consider making one of these return with no wait. Issue 2. No matter how I mix the use of .system in a trigger I cannot get the syntax checker to allow for (dot) functions .system or .shell to work. I know there is a qualifier about where the (dot) functions are parsed but I have successfully used other (dot) functions in a trigger. Triggering external applications on database events is a critical function. sqlite> CREATE TRIGGER testor ...> BEFORE INSERT ON moz_cookies ...> BEGIN ...> DELETE FROM moz_cookies WHERE name = 'mimeMapApp'; ...> .system /home/EB30750/Documents/Provox/deltvImport; ...> END; Error: near ".": syntax error ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users