com.caucho.jdbc
Class GenericMetaData

java.lang.Object
  extended by com.caucho.jdbc.JdbcMetaData
      extended by com.caucho.jdbc.GenericMetaData
Direct Known Subclasses:
DerbyMetaData, MysqlMetaData, OracleMetaData, PostgresMetaData, ResinMetaData, SqlServerMetaData

public class GenericMetaData
extends JdbcMetaData


Constructor Summary
GenericMetaData(javax.sql.DataSource ds)
           
 
Method Summary
 java.lang.String createIdentitySQL(java.lang.String sqlType)
          Returns the identity property
 java.lang.String createSequenceSQL(java.lang.String name, int size)
          Returns a sequence select expression.
 java.lang.String getBlobType()
          Returns the blob type.
 java.lang.String getCreateColumnSQL(int sqlType, int length, int precision, int scale)
          to Return SQL for the table with the given SQL type.
protected  java.lang.String getCreateColumnSQLImpl(int sqlType, int length, int precision, int scale)
          Returns the SQL for the table with the given SQL type.
protected  java.lang.String getDefaultCreateTableSQL(int sqlType, int length, int precision, int scale)
           
 java.lang.String getFalseLiteral()
          Returns the literal for FALSE.
 java.lang.String getLongType()
          Returns the long type.
 java.lang.String selectSequenceSQL(java.lang.String name)
          Returns a sequence select expression.
 boolean supportsGetGeneratedKeys()
          True if the generated keys is supported
 boolean supportsIdentity()
          Returns true if identity is supported.
 boolean supportsPositionFunction()
          Returns true if the POSITION function is supported.
 boolean supportsSequences()
          Returns true if sequences are supported.
 boolean supportsUpdateTableAlias()
          Returns true if table alias name with UPDATE is supported.
 boolean supportsUpdateTableList()
          Returns true if table list with UPDATE is supported: UPDATE table1 a, table2 b SET ...
 
Methods inherited from class com.caucho.jdbc.JdbcMetaData
create, generateBoolean, getConnection, getDatabaseName, isForeignKeyViolationSQLState, isLimit, isLimitOffset, isTruncateBlobBeforeDelete, isUniqueConstraintSQLState, limit, testSequenceSQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericMetaData

public GenericMetaData(javax.sql.DataSource ds)
Method Detail

getLongType

public java.lang.String getLongType()
Returns the long type.

Specified by:
getLongType in class JdbcMetaData

getBlobType

public java.lang.String getBlobType()
Returns the blob type.

Specified by:
getBlobType in class JdbcMetaData

getFalseLiteral

public java.lang.String getFalseLiteral()
Returns the literal for FALSE.

Specified by:
getFalseLiteral in class JdbcMetaData

supportsGetGeneratedKeys

public boolean supportsGetGeneratedKeys()
True if the generated keys is supported

Specified by:
supportsGetGeneratedKeys in class JdbcMetaData

supportsPositionFunction

public boolean supportsPositionFunction()
Returns true if the POSITION function is supported.

Specified by:
supportsPositionFunction in class JdbcMetaData

supportsUpdateTableAlias

public boolean supportsUpdateTableAlias()
Returns true if table alias name with UPDATE is supported.

Specified by:
supportsUpdateTableAlias in class JdbcMetaData

supportsUpdateTableList

public boolean supportsUpdateTableList()
Returns true if table list with UPDATE is supported: UPDATE table1 a, table2 b SET ...

Specified by:
supportsUpdateTableList in class JdbcMetaData

supportsIdentity

public boolean supportsIdentity()
Returns true if identity is supported.

Specified by:
supportsIdentity in class JdbcMetaData

createIdentitySQL

public java.lang.String createIdentitySQL(java.lang.String sqlType)
Returns the identity property

Specified by:
createIdentitySQL in class JdbcMetaData

supportsSequences

public boolean supportsSequences()
Returns true if sequences are supported.

Specified by:
supportsSequences in class JdbcMetaData

createSequenceSQL

public java.lang.String createSequenceSQL(java.lang.String name,
                                          int size)
Returns a sequence select expression.

Specified by:
createSequenceSQL in class JdbcMetaData

selectSequenceSQL

public java.lang.String selectSequenceSQL(java.lang.String name)
Description copied from class: JdbcMetaData
Returns a sequence select expression.

Specified by:
selectSequenceSQL in class JdbcMetaData

getCreateColumnSQL

public java.lang.String getCreateColumnSQL(int sqlType,
                                           int length,
                                           int precision,
                                           int scale)
to Return SQL for the table with the given SQL type. Takes, length, precision and scale.

Specified by:
getCreateColumnSQL in class JdbcMetaData

getCreateColumnSQLImpl

protected java.lang.String getCreateColumnSQLImpl(int sqlType,
                                                  int length,
                                                  int precision,
                                                  int scale)
Returns the SQL for the table with the given SQL type.


getDefaultCreateTableSQL

protected java.lang.String getDefaultCreateTableSQL(int sqlType,
                                                    int length,
                                                    int precision,
                                                    int scale)