|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.triactive.jdo.store.DatabaseAdapter
com.triactive.jdo.store.PostgreSQLAdapter
public class PostgreSQLAdapter
Provides methods for adapting SQL language elements to the PostgreSQL database.
Field Summary |
---|
Fields inherited from class com.triactive.jdo.store.DatabaseAdapter |
---|
databaseMajorVersion, databaseMinorVersion, databaseProductName, databaseProductVersion, identifierQuoteString, keywords, maxColumnNameLength, maxConstraintNameLength, maxIndexNameLength, maxTableNameLength, storesLowerCaseIdentifiers, storesUpperCaseIdentifiers, typeMappings, typesByTypeNumber |
Constructor Summary | |
---|---|
PostgreSQLAdapter(java.sql.DatabaseMetaData metadata)
|
Method Summary | |
---|---|
java.lang.String |
getDropTableStatement(BaseTable table)
Returns the appropriate SQL to drop the given table. |
SQLState |
getSQLState(java.sql.SQLException se)
Returns a SQLState object for the specified SQLException, if one is present and valid. |
java.lang.String |
getVendorID()
|
ColumnInfo |
newColumnInfo(java.sql.ResultSet rs)
A factory for ColumnInfo objects. |
ForeignKeyInfo |
newForeignKeyInfo(java.sql.ResultSet rs)
A factory for ForeignKeyInfo objects. |
TableExpression |
newTableExpression(QueryStatement qs,
Table table,
SQLIdentifier rangeVar)
Returns a new TableExpression object appropriate for this DBMS. |
TypeInfo |
newTypeInfo(java.sql.ResultSet rs)
A factory for TypeInfo objects. |
boolean |
supportsAlterTableDropConstraint()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PostgreSQLAdapter(java.sql.DatabaseMetaData metadata)
Method Detail |
---|
public java.lang.String getVendorID()
getVendorID
in class DatabaseAdapter
public SQLState getSQLState(java.sql.SQLException se)
DatabaseAdapter
getSQLState
in class DatabaseAdapter
se
- A caught SQL exception.
null
if se does not
contain a valid 5-character SQLSTATE.public TableExpression newTableExpression(QueryStatement qs, Table table, SQLIdentifier rangeVar)
DatabaseAdapter
newTableExpression
in class DatabaseAdapter
qs
- The query statement in which the table expression will
be included.table
- The main table in the expression.rangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the main table.public TypeInfo newTypeInfo(java.sql.ResultSet rs)
DatabaseAdapter
ResultSet
object passed must have been
obtained from a call to DatabaseMetaData.getTypeInfo().
The constructor only retrieves the values from the current row; the
caller is required to advance to the next row with ResultSet.next()
.
newTypeInfo
in class DatabaseAdapter
rs
- The result set returned from DatabaseMetaData.getTypeInfo().
null
if the type indicated by this row should be
excluded from use.public ColumnInfo newColumnInfo(java.sql.ResultSet rs)
DatabaseAdapter
ResultSet
object passed must have been
obtained from a call to DatabaseMetaData.getColumns().
The constructor only retrieves the values from the current row; the
caller is required to advance to the next row with ResultSet.next()
.
newColumnInfo
in class DatabaseAdapter
rs
- The result set returned from DatabaseMetaData.getColumns().public ForeignKeyInfo newForeignKeyInfo(java.sql.ResultSet rs)
DatabaseAdapter
ResultSet
object passed must have been
obtained from a call to DatabaseMetaData.getImportedKeys() or
DatabaseMetaData.getExportedKeys().
The constructor only retrieves the values from the current row; the
caller is required to advance to the next row with ResultSet.next()
.
newForeignKeyInfo
in class DatabaseAdapter
rs
- The result set returned from DatabaseMetaData.get??portedKeys().public boolean supportsAlterTableDropConstraint()
supportsAlterTableDropConstraint
in class DatabaseAdapter
public java.lang.String getDropTableStatement(BaseTable table)
DatabaseAdapter
DROP TABLE FOO CASCADE
getDropTableStatement
in class DatabaseAdapter
table
- The table to drop.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |