Package org.eclipse.net4j.db
Schnittstelle IDBAdapter
- Alle bekannten Implementierungsklassen:
DBAdapter
,DerbyAdapter
,EmbeddedDerbyAdapter
,H2Adapter
,HSQLDBAdapter
,MYSQLAdapter
,PostgreSQLAdapter
public interface IDBAdapter
Abstracts all aspects of a database that are vendor-specific.
- Autor:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients. Subclass
DBAdapter
instead.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final org.eclipse.net4j.util.registry.IRegistry
<String, IDBAdapter> -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungProvide a way for the DBAdapter to override unsupported DB types with replacements.createConnectionProvider
(DataSource dataSource) Veraltet.As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).void
createSchema
(Connection connection, String schemaName) boolean
createTable
(IDBTable table, Statement statement) createTables
(Iterable<? extends IDBTable> tables, Connection connection) boolean
dropTables
(Iterable<? extends IDBTable> tables, Connection connection) getDefaultSchemaName
(Connection connection) int
getFieldLength
(DBType type) Returns the column length for the given database type.Veraltet.As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).int
int
getName()
String[]
boolean
boolean
boolean
Check if an exception indicates a constraint violation (duplicate key)boolean
isReservedWord
(String word) boolean
boolean
isTypeIndexable
(DBType type) boolean
isValidFirstChar
(char ch) Check if a character is valid as first character.modifyConnection
(Connection connection) readSchema
(Connection connection, String name) void
readSchema
(Connection connection, IDBSchema schema) sqlModifyField
(IDBField field) sqlRenameField
(IDBField field, String oldName) void
updateSchema
(Connection connection, IDBSchema schema, IDBSchemaDelta delta)
-
Felddetails
-
REGISTRY
-
-
Methodendetails
-
getName
String getName() -
getVersion
String getVersion() -
isCaseSensitive
boolean isCaseSensitive()- Seit:
- 4.12
-
getDefaultSchemaName
- Seit:
- 4.12
-
createConnectionProvider
- Seit:
- 4.3
-
modifyConnection
- Seit:
- 4.5
-
createSchema
- Seit:
- 4.12
-
readSchema
- Seit:
- 4.2
-
readSchema
- Seit:
- 4.2
-
updateSchema
- Löst aus:
DBException
- Seit:
- 4.2
-
createTables
Set<IDBTable> createTables(Iterable<? extends IDBTable> tables, Connection connection) throws DBException - Löst aus:
DBException
-
createTable
- Löst aus:
DBException
-
dropTables
Collection<IDBTable> dropTables(Iterable<? extends IDBTable> tables, Connection connection) throws DBException - Löst aus:
DBException
-
dropTable
-
getReservedWords
String[] getReservedWords() -
isReservedWord
-
getMaxTableNameLength
int getMaxTableNameLength()- Seit:
- 2.0
-
getMaxFieldNameLength
int getMaxFieldNameLength()- Seit:
- 2.0
-
getFieldLength
Returns the column length for the given database type.- Parameter:
type
- theDBType
to check.- Gibt zurück:
- the supported column length for the type.
- Seit:
- 4.2
-
isTypeIndexable
-
adaptType
Provide a way for the DBAdapter to override unsupported DB types with replacements. The default implementation just returns the given type. Subclasses may override single types with replacements.- Seit:
- 3.0
-
isValidFirstChar
boolean isValidFirstChar(char ch) Check if a character is valid as first character. (e.g., underscores are forbidden as first character in Derby elements.- Seit:
- 4.0
-
isDuplicateKeyException
Check if an exception indicates a constraint violation (duplicate key)- Seit:
- 4.0
-
isTableNotFoundException
- Seit:
- 4.2
-
isColumnNotFoundException
- Seit:
- 4.2
-
sqlRenameField
- Seit:
- 4.2
-
sqlModifyField
- Seit:
- 4.2
-
getJDBCDriver
Veraltet.As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs). -
createJDBCDataSource
Veraltet.As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
-