Package com.softwaremining.jcl
Class SQLLoader
java.lang.Object
com.softwaremining.jcl.SQLLoader
Used for executing SQL statements
usage
usage
java com.softwaremining.jcl.SQLLoader -file=filename.sql or java com.softwaremining.jcl.SQLLoader SQL-Statement [e.g. java com.softwaremining.jcl.SQLLoader DELETE * FROM TABLE-1Notes
- the system will pick up the database credentials from db.properties file
- when using the file=filename.sql option, the system will look for file in class path (softwaremining.properties DATA_DIR is ignored)
- when executing an SQL Select statement - the results will be writing to console (System.out.print) it is upto the JCL script to redirect to SYSPRNT or other files .
- when using the file=filename.sql option, the file may contain several SQL statements, each separated by ";" e.g.
SELECT * FROM TABLE-1; DELETE FROM TABLE-1; INSERT into table-1 (COLUMN1, COLUMN2) values ('A' , 'B') ; INSERT into table-1 (COLUMN1, COLUMN2) values ('C' , 'D') ;
- unless db.properties has assigned auto-commit=true, the system "commits" after executing every SQL statement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.softwaremining.jcl.SQLLoader.ESQLTest
protected ESQLProcessor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeSQLFile
(String fileAndPathName) void
static SQLLoader
static void
void
-
Field Details
-
baseObject
protected com.softwaremining.jcl.SQLLoader.ESQLTest baseObject -
sqlProcessor
-
-
Method Details
-
getInstance
-
setDBUrl
-
executeSQLStatement
-
executeSQLFile
-
main
-