Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
: Class RealSQLConnection (RealSQL-JDBC) (realsqlconnection.html)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.northgateis.reality.realsql.RealSQLConnection
The RealSQLConnection class is an implementation of the JDBC 2.0 Connection interface.
Connection
,
DriverManager.getConnection(java.lang.String)
Constructor Summary | |
RealSQLConnection(java.lang.String url,
java.lang.String host,
int port,
java.lang.String dbase,
java.util.Properties info)
Constructs a new connection object and attempts to establish a connection to the specified Reality database URL. |
Method Summary | |
void | clearWarnings() Clears all warnings reported for this Connection object. |
void | close() Close's the connection to the database and release's any JDBC resources immediately instead of waiting for them to be automatically released. |
void | commit() Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the connection. |
java.sql.Statement | createStatement() Creates a Statement object for sending SQL statements to the database. |
java.sql.Statement | createStatement(int type,
int concur) JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency. |
boolean | getAutoCommit() Get the current AutoCommit state. |
java.lang.String | getCatalog() Returns the Connection's current catalog name. |
java.sql.DatabaseMetaData | getMetaData() Gets the metadata from this connection's Reality database. |
protected RealServer | getServer() Get the Server object associated with this connection. |
protected int | getServerVersion() Get the server version number. |
int | getTransactionIsolation() Gets this Connection's current transaction isolation level. |
java.util.Map | getTypeMap() Not supported by the RealSQL-JDBC driver. |
protected java.lang.String | getUrl() |
protected java.lang.String | getUserName() |
java.sql.SQLWarning | getWarnings() Returns the first warning reported by calls on this Connection. |
boolean | isClosed() Tests to see if this connection is closed. |
boolean | isReadOnly() Tests to see if the connection is in READ_ONLY mode. |
java.lang.String | nativeSQL(java.lang.String sql) Converts the given SQL statement into the system's native SQL grammar. |
java.sql.CallableStatement | prepareCall(java.lang.String sql) Creates a CallableStatement object for calling database stored procedures. |
java.sql.CallableStatement | prepareCall(java.lang.String sql,
int type,
int concur) JDBC 2.0 Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.PreparedStatement | prepareStatement(java.lang.String sql) Creates a PreparedStatement object for sending parameterized SQL statements to the database. |
java.sql.PreparedStatement | prepareStatement(java.lang.String sql,
int type,
int concur) JDBC 2.0 Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. |
void | rollback() Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection. |
void | setAutoCommit(boolean b) Sets this connection's auto-commit mode. |
void | setCatalog(java.lang.String name) Sets a catalog name in order to select a subspace of this Connection's database in which to work. |
void | setReadOnly(boolean b) Puts this connection in read-only mode as a hint to enable database optimizations. |
void | setTransactionIsolation(int level) Attempts to change the transaction isolation level to the one given. |
void | setTypeMap(java.util.Map map) Not supported by the RealSQL-JDBC driver. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RealSQLConnection(java.lang.String url, java.lang.String host, int port, java.lang.String dbase, java.util.Properties info) throws java.sql.SQLException
url
- a database url of the form jdbc:realsql://host:port/database.host
- remote system name.dbase
- remote database name as defined in the ROUTE-FILE or
equivalent.info
- a list of string tag/value pairs containg "user",
"password", "account", "accountpwd", and "logging" properties.Method Detail |
public void clearWarnings() throws java.sql.SQLException
public void close() throws java.sql.SQLException
public void commit() throws java.sql.SQLException
public java.sql.Statement createStatement() throws java.sql.SQLException
Reality only supports ResultSets having a type of FORWARD_ONLY, and a concurrency of READ_ONLY.
public java.sql.Statement createStatement(int type, int concur) throws java.sql.SQLException
Reality only supports ResultSets having a type of FORWARD_ONLY, and a concurrency of READ_ONLY. Attempting to create a statement with any other type or concurrancy will throw an exception.
type
- a result set type; see ResultSet.TYPE_XXXconcur
- a concurrency type; see ResultSet.CONCUR_XXXpublic boolean getAutoCommit() throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
Reality supports the following transaction isolation levels:
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
public boolean isClosed()
public boolean isReadOnly() throws java.sql.SQLException
The driver always returns false.
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
The driver does not perform any conversions prior to passing it onto the Reality SQL Server.
sql
- a SQL statement that may contain one or more '?'
parameter placeholderspublic java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
Stored Procedures in a Reality database are implemented using Databasic Subroutines. They are deemed to invoke an update query, although an update does not actually have to occur. Consequntly a ResultSet cannot be returned by executing a stored procedure on a Reality database.
sql
- a SQL statement that may contain one or more '?'
parameter placeholders.
Typically this statement is a JDBC function call escape string.public java.sql.CallableStatement prepareCall(java.lang.String sql, int type, int concur) throws java.sql.SQLException
Stored Procedures in a Reality database are implemented using Databasic Subroutines. They are deemed to invoke an update query, although an update does not actually have to occur. Consequntly a ResultSet cannot be returned by executing a stored procedure on a Reality database.
resultSetType
- a result set type; see ResultSet.TYPE_XXXresultSetConcurrency
- a concurrency type; see ResultSet.CONCUR_XXXpublic java.util.Map getTypeMap() throws java.sql.SQLException
JDBC 2.0 Gets the type map object associated with this connection. Unless the application has added an entry to the type map, the map returned will be empty.
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
JDBC 2.0 Installs the given type map as the type map for this connection. The type map will be used for the custom mapping of SQL structured types and distinct types.
the
- java.util.Map object to install as the replacement for this
Connection object's default type mappublic java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
sql
- a SQL statement that may contain one or more '?' IN
parameter placeholders.public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int type, int concur) throws java.sql.SQLException
resultSetType
- a result set type; see ResultSet.TYPE_XXXresultSetConcurrency
- a concurrency type; see ResultSet.CONCUR_XXXpublic void rollback() throws java.sql.SQLException
public void setAutoCommit(boolean b) throws java.sql.SQLException
Reality does not support the returning of multiple ResultSets.
autoCommit
- true enables auto-commit; false disables auto-commit.public void setCatalog(java.lang.String name) throws java.sql.SQLException
catalogName
- catalog name.public void setReadOnly(boolean b) throws java.sql.SQLException
The driver does not support read-only connections.
b
- true enables read-only mode; false disables read-only mode.public void setTransactionIsolation(int level) throws java.sql.SQLException
Reality supports the following transaction isolation levels:
level
- one of the supported transaction isolation values with the
exception of TRANSACTION_NONEprotected RealServer getServer()
protected int getServerVersion()
protected java.lang.String getUserName()
protected java.lang.String getUrl()
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |