Usage

SQLEditor <action> <options>
SQLEditor -help

Returns 0 if no error, or 1 if something went wrong
If you do not specify a valid action, then SQLEditor will launch in graphical mode

Actions

-importdb    imports from database (dsn) to sqleditor file (of)
-exportdb    exports from sqleditor file (if) to database (dsn)
-importsql   imports from sql source file (if) to (of) sqleditor file  
-exportsql   exports from sqleditor file (if) to (of) sql source file  
-help        display help summary

Options

-dsn The full dsn for the database (importdb,exportdb)
-u Username for database (importdb,exportdb)
-p Password for database (importdb,exportdb)
-driver Driver Classpath for database driver (importdb,exportdb)
-if Input file to read from (exportdb, importsql,exportsql)
-of Output file to write to (importdb, importsql,exportsql)

Database actions require -dsn, most also require -u, -p and some require -driver

Example

To import from a mysql database ‘test’ on the localhost machine:

SQLEditor -importdb -driver "com.mysql.jdbc.Driver" -dsn "jdbc:mysql://localhost/test" -u "test" -p "test" -of "output.sqs"

To export from a SQLEditor document to a specified mysql database ‘test’ on the localhost machine:

SQLEditor -exportdb -driver "com.mysql.jdbc.Driver" -dsn "jdbc:mysql://localhost/test" -u "test" -p "test" -if "input.sqs"

To export from a SQLEditor document to SQL (dialect as specified in file):

SQLEditor -exportsql  -if "input.sqs" -of "output.sql" -dsn "" -driver ""

To import from an SQL file to a SQLEditor document:

SQLEditor -importsql  -if "input.sql" -of "output.sqs" -dsn "" -driver ""

Need more help?

Email us at support@malcolmhardie.com

  • Date: 2018-10-21