public abstract class JdbcMetaData
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
JdbcMetaData(javax.sql.DataSource ds)
Create a new JDBC backing store.
|
Modifier and Type | Method and Description |
---|---|
static JdbcMetaData |
create(javax.sql.DataSource ds)
Create based on the connection.
|
abstract java.lang.String |
createIdentitySQL(java.lang.String sqlType)
Returns the identity property
|
abstract java.lang.String |
createSequenceSQL(java.lang.String name,
int size)
Returns a sequence select expression.
|
java.lang.String |
generateBoolean(java.lang.String term)
Returns the code to test for a boolean value for a term.
|
abstract java.lang.String |
getBlobType()
Returns the blob type.
|
protected java.sql.Connection |
getConnection()
Returns a connection, which must then be closed.
|
abstract java.lang.String |
getCreateColumnSQL(int sqlType,
int length,
int precision,
int scale)
New version to Return SQL for the table with the given
SQL type.
|
java.lang.String |
getDatabaseName()
Returns the database name.
|
abstract java.lang.String |
getFalseLiteral()
Returns the literal for FALSE.
|
abstract java.lang.String |
getLongType()
Returns the long type.
|
boolean |
isForeignKeyViolationSQLState(java.lang.String sqlState)
Returns true if the sql state is a "foreign key violation" error.
|
boolean |
isLimit()
Returns true if the metadata can handle limit
|
boolean |
isLimitOffset()
Returns true if the metadata can handle limit and offset
|
boolean |
isTruncateBlobBeforeDelete()
True if blobs must be truncated on delete.
|
boolean |
isUniqueConstraintSQLState(java.lang.String sqlState)
Returns true if the sql state is a "duplicate primary key" error.
|
java.lang.String |
limit(java.lang.String sql,
int firstResults,
int maxResults)
Returns a limit.
|
abstract java.lang.String |
selectSequenceSQL(java.lang.String name)
Returns a sequence select expression.
|
abstract boolean |
supportsGetGeneratedKeys()
True if the generated keys is supported
|
abstract boolean |
supportsIdentity()
Returns true if identity is supported.
|
abstract boolean |
supportsPositionFunction()
Returns true if the POSITION function is supported.
|
abstract boolean |
supportsSequences()
Returns true if sequences are supported.
|
abstract boolean |
supportsUpdateTableAlias()
Returns true if table alias name with UPDATE is supported.
|
abstract boolean |
supportsUpdateTableList()
Returns true if table list with UPDATE is supported:
UPDATE table1 a, table2 b SET ...
|
java.lang.String |
testSequenceSQL(java.lang.String name)
Returns a sequence select expression.
|
protected JdbcMetaData(javax.sql.DataSource ds)
public static JdbcMetaData create(javax.sql.DataSource ds)
public java.lang.String getDatabaseName()
public abstract java.lang.String getBlobType()
public boolean isTruncateBlobBeforeDelete()
public abstract boolean supportsGetGeneratedKeys()
public abstract java.lang.String getFalseLiteral()
public abstract boolean supportsPositionFunction()
public abstract boolean supportsUpdateTableAlias()
public abstract boolean supportsUpdateTableList()
public boolean isForeignKeyViolationSQLState(java.lang.String sqlState)
public boolean isUniqueConstraintSQLState(java.lang.String sqlState)
public abstract java.lang.String getLongType()
public abstract boolean supportsIdentity()
public abstract java.lang.String createIdentitySQL(java.lang.String sqlType)
public abstract boolean supportsSequences()
public abstract java.lang.String createSequenceSQL(java.lang.String name, int size)
public abstract java.lang.String selectSequenceSQL(java.lang.String name)
public java.lang.String testSequenceSQL(java.lang.String name)
public java.lang.String generateBoolean(java.lang.String term)
public boolean isLimit()
public boolean isLimitOffset()
public java.lang.String limit(java.lang.String sql, int firstResults, int maxResults)
public abstract java.lang.String getCreateColumnSQL(int sqlType, int length, int precision, int scale)
protected java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException