Package com.storedobject.core
Class RawSQL
java.lang.Object
com.storedobject.core.RawSQL
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
cancel()
void
close()
void
commit()
static Process
dumpDatabase
(String securityPassword, boolean sql, String databaseName) Dump data of a given database.boolean
eoq()
boolean
execute()
boolean
int
int
executeUpdate
(String sql) boolean
static SQLConnector
int
getError()
static SQLNullConnectionHandler
Get the "resource" owned by this "resource owner".long
getSQL()
int
getState()
void
boolean
next()
prepareCall
(String sql) static Process
restoreDatabase
(String securityPassword, String databaseName) Restore data to a given database.void
rollback()
void
setAutoCommit
(boolean mode) void
setAutoNext
(boolean autoNext) static void
setConnector
(SQLConnector connector) void
setError
(int error) static void
void
long
skip()
long
skip
(long rows)
-
Field Details
-
debug
public static boolean debug -
RUNNING
public static final int RUNNING- See Also:
-
SOQ
public static final int SOQ- See Also:
-
EOQ
public static final int EOQ- See Also:
-
COMPILE
public static final int COMPILE- See Also:
-
CLOSED
public static final int CLOSED- See Also:
-
-
Method Details
-
getResource
Description copied from interface:ResourceOwner
Get the "resource" owned by this "resource owner".- Specified by:
getResource
in interfaceResourceOwner
- Returns:
- The "resource" owned by this "resource owner".
-
setAutoNext
public void setAutoNext(boolean autoNext) -
getAutoNext
public boolean getAutoNext() -
getError
public int getError() -
setError
public void setError(int error) -
setSQL
-
addSQL
-
getSQL
-
getDatabaseMetaData
- Throws:
Exception
-
prepare
-
prepareCall
- Throws:
Exception
-
getStatement
- Throws:
SQLException
-
executeUpdate
-
executeUpdate
public int executeUpdate() -
execute
-
execute
public boolean execute() -
cancel
public void cancel() -
close
public void close() -
next
public boolean next() -
skip
public long skip() -
skip
public long skip(long rows) -
getRowCount
public long getRowCount() -
eoq
public boolean eoq() -
getState
public int getState() -
getResult
-
setNullConnectionHandler
-
getNullConnectionHandler
-
setConnector
-
getConnector
-
logWarnings
- Throws:
Error_Running_SQL
-
rollback
public void rollback() -
commit
public void commit() -
setAutoCommit
public void setAutoCommit(boolean mode) -
dumpDatabase
Dump data of a given database.- Parameters:
securityPassword
- Security password.sql
- True if download as plain SQL statements.databaseName
- Database name (if null is passed, current DB is dumped).- Returns:
- Data dumping process. The
OutputStream
of the process will stream out the data.
-
restoreDatabase
Restore data to a given database.- Parameters:
securityPassword
- Security password.databaseName
- Name of the database to restore.- Returns:
- Data loading process. The
InputStream
of the process can accept SQL commands for restoring the data.
-