public interface AQServerConnection
Modifier and Type | Method and Description |
---|---|
void |
changeDatabase(java.lang.String name)
Change database in the current connection.
|
void |
changeSchema(java.lang.String name)
Change schema in the current connection.
|
void |
commit()
Commits a transaction.
|
void |
connect()
Establish SQL connection to the server.
|
void |
connect(java.lang.Object password)
Establish SQL connection to the server with the provided password.
|
void |
connect(java.lang.Object username,
java.lang.Object password)
Establish SQL connection to the server with the provided user credentials.
|
void |
disconnect()
Disconnect a server connection.
|
boolean |
execute(java.lang.String sql)
Execute a query.
|
AQResultSet |
executeQuery(java.lang.String sql)
Execute a query to get a result set.
|
AQScriptResult |
executeScript(java.lang.String script)
Executes a script, which may contain multiple statements, and may produce multiple
result sets.
|
AQDataSet |
executeSnapshot(java.lang.String sql)
Execute query and extract data into AQDataSet.
|
int |
executeUpdate(java.lang.String sql)
Execute an update query.
|
java.lang.String |
getCurrentDatabase()
Get the current database the connection is connected to.
|
java.sql.Connection |
getJdbcConnection()
Returns underlying JDBC connection.
|
AQMetadata |
getMetadata()
Get metadata object which allows for introspection of the database structure.
|
java.lang.String |
getName()
Get connection name (as seen in the schema tree).
|
AQScriptOptions |
getScriptOptions()
Returns an instance of AQScriptOption object associated with the given connection.
|
java.lang.String |
getSessionID()
To get the connection session id.
|
java.lang.String |
getVersionString()
Get database/server version.
|
boolean |
isCaseSensitive()
Returns true if names in this connections are case sensitive.
|
boolean |
isConnected()
Get the connection status of the connection session.
|
AQScriptOptions |
newScriptOptions()
Creates a copy of AQScriptOption object associated with the given connection.
|
AQScriptParser |
newScriptParser()
Creates a new script parser object.
|
AQSqlFormatter |
newSqlFormat()
Creates new SQL formatter object.
|
void |
rollback()
Rolls back a transaction.
|
void |
setAutoCommit(boolean enable)
Sets auto-commit mode.
|
java.lang.String |
sqlEncode(java.lang.String string)
Escapes single quote characters in a string to
make it safe for inclusion into a SQL query.
|
java.lang.String getName()
java.lang.String getSessionID()
AQMetadata getMetadata()
boolean execute(java.lang.String sql) throws java.lang.Exception
sql
- The SQL statement.true
: If the first result is a ResultSet
object;
false
: If it is an update count or there are no results.java.lang.Exception
- on error. eg. if SQL statementint executeUpdate(java.lang.String sql) throws java.lang.Exception
sql
- The SQL statement.java.lang.Exception
- If SQL statement is not a data manipulation statement.AQResultSet executeQuery(java.lang.String sql) throws java.lang.Exception
sql
- The SQL statement.java.lang.Exception
- If SQL statement is a data manipulation statement.AQDataSet executeSnapshot(java.lang.String sql) throws java.lang.Exception
sql
- The SQL statement.java.lang.Exception
- on error.void connect() throws java.lang.Exception
java.lang.Exception
- on error.void connect(java.lang.Object password) throws java.lang.Exception
password
- A String
password or a AQOpaqueObject
with the password.java.lang.Exception
- on error.void connect(java.lang.Object username, java.lang.Object password) throws java.lang.Exception
username
- A String
or a AQOpaqueObject
with the user name.password
- A String
password or a AQOpaqueObject
with the password.java.lang.Exception
- on error.boolean isConnected()
void disconnect()
java.lang.String getVersionString()
boolean isCaseSensitive()
void changeDatabase(java.lang.String name) throws java.lang.Exception
name
- The name of the database.java.lang.Exception
- On errorvoid changeSchema(java.lang.String name) throws java.lang.Exception
name
- The name of the schema.java.lang.Exception
- On errorAQScriptResult executeScript(java.lang.String script) throws java.lang.Exception
script
- The script to be executed.java.lang.Exception
- On errorjava.lang.String sqlEncode(java.lang.String string)
string
- The string to be encoded.AQScriptOptions getScriptOptions()
AQScriptOptions newScriptOptions()
AQSqlFormatter newSqlFormat()
AQScriptParser newScriptParser()
java.lang.String getCurrentDatabase()
java.sql.Connection getJdbcConnection()
Connection
void setAutoCommit(boolean enable) throws java.lang.Exception
Connection.setAutoCommit(boolean)
.enable
- to enable/disablejava.lang.Exception
- On errorvoid rollback() throws java.lang.Exception
Connection.rollback()
.java.lang.Exception
- On errorvoid commit() throws java.lang.Exception
Connection.commit()
.java.lang.Exception
- On error
Copyright © 2019 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.