public abstract class ConnManager extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
ConnManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Perform any shutdown operations on the connection.
|
String |
escapeTableName(String tableName)
When using a table name in a generated SQL query, how (if at all) should
we escape that column name? e.g., a table named "table" may need to be
quoted with backtiks: "`table`".
|
Map<String,DatabaseMetaData.Column> |
getColumnTypeNames(String tableName,
String sqlQuery)
Return an unordered mapping from colname to sql type name for all columns
in a table or query.
|
Map<String,DatabaseMetaData.Column> |
getColumnTypeNamesForQuery(String query)
Return an unordered mapping from colname to sql type name for all columns
in a query.
|
Map<String,DatabaseMetaData.Column> |
getColumnTypeNamesForTable(String tableName)
Return an unordered mapping from colname to sql type name for all columns
in a table.
|
Map<String,Integer> |
getColumnTypesForQuery(String query)
Return an unordered mapping from colname to sqltype for all columns in a
query.
|
abstract Connection |
getConnection() |
abstract String |
getDriverClass() |
abstract void |
release()
If a method of this ConnManager has returned a ResultSet to you, you are
responsible for calling release() after you close the ResultSet object,
to free internal resources.
|
String |
timestampToQueryString(Timestamp ts)
Given a non-null Timestamp, return the quoted string that can be inserted
into a SQL statement, representing that timestamp.
|
public Map<String,DatabaseMetaData.Column> getColumnTypeNamesForTable(String tableName)
public Map<String,DatabaseMetaData.Column> getColumnTypeNamesForQuery(String query)
public Map<String,DatabaseMetaData.Column> getColumnTypeNames(String tableName, String sqlQuery)
tableName
- the name of the tablesqlQuery
- the SQL query to use if tableName is nullpublic Map<String,Integer> getColumnTypesForQuery(String query)
public abstract Connection getConnection() throws SQLException
SQLException
public abstract String getDriverClass()
public String escapeTableName(String tableName)
tableName
- the table name as provided by the user, etc.public abstract void close() throws SQLException
SQLException
public abstract void release()
Copyright © 2016 Actian Corporation. All Rights Reserved.