Hi,
This is very convenient extension to integrate maintenance database
tasks ala *nix command into general tasks and cron scripts.

Can be useful too an additional extension for an  "-sqlFile
<sqlFileName>"   option to get a complete script from an external sql file.

I think that would be convenient to if  H2 Shell and H2 Console share a
common behavior and capabilities for their respective devices ( tty and
browser ).
So console built-in @command can be available to the shell too.

> I did a bit more and support multiple statements:
>
> java org.h2.tools.Shell -url jdbc:h2:test -sql "select 'hello'; select
> 'world' from dual"
>
> Using the following:
>
> ScriptReader r = new ScriptReader(new StringReader(sql));
> while (true) {
>     String s = r.readStatement();
>     if (s == null) {
>         break;
>     }
>     execute(s);
> }

Regards,
Dario

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to