public class Oracle extends AnsiStandard
| Modifier and Type | Class and Description |
|---|---|
static class |
Oracle.OracleBooleanPoemType
Translates an Oracle Boolean into a Poem
BooleanPoemType. |
static class |
Oracle.OracleStringPoemType
Translates a Oracle String into a Poem
StringPoemType. |
| Modifier and Type | Field and Description |
|---|---|
static int |
oracleTextHack
Oracle does not have a pleasant
TEXT
datatype, so we use an arbetary value in a
VARCHAR. |
| Constructor and Description |
|---|
Oracle()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
booleanTrueExpression(Column<Boolean> booleanColumn)
Accommodate lack of boolean types in underlying DBMS.
|
<S,O> PoemType<O> |
canRepresent(PoemType<S> storage,
PoemType<O> type)
Enable one PoemType to represent another,
for example a bit to represent a boolean.
|
SQLPoemType<?> |
defaultPoemTypeOfColumnMetaData(ResultSet md)
The simplest POEM type corresponding to a JDBC description from the
database.
|
String |
getBinarySqlDefinition(int size)
Accommodate different treatment of different sized binary data.
|
String |
getForeignKeyDefinition(String tableName,
String fieldName,
String targetTableName,
String targetTableFieldName,
String fixName)
If Foreign key definitions are part of field definitions,
otherwise blank (silently unsupported).
|
String |
getLongSqlDefinition()
Accommodate Long / Bigint deviants.
|
String |
getPrimaryKeyDefinition(String fieldName)
Return the PRIMARY KEY definition string for this dbms.
|
String |
getSqlDefaultValue(SQLType<?> sqlType)
Used to set a not null value when
creating a non nullable column.
|
String |
getSqlDefinition(String sqlTypeName)
Retrieve a SQL type keyword used by the DBMS
for the given Melati type name.
|
String |
getStringSqlDefinition(int size)
Accommodate String/CLOB distinction.
|
String |
melatiName(String name)
Reverse the mapping in unreservedName.
|
String |
sqlBooleanValueOfRaw(Object raw)
Accommodate different true and false values.
|
String |
unreservedName(String name)
A pair of functions for getting around keywords which make your
JDBC driver barf, as 'group' does for MySQL.
|
alterColumnAddCommentSQL, alterColumnNotNullableSQL, alterTableAddCommentSQL, canBeIndexed, canDropColumns, canStoreBlobs, caseInsensitiveRegExpSQL, createTableOptionsSql, createTableSql, createTableTypeQualifierSql, exceptionForUpdate, exceptionForUpdate, getConnection, getFixedPtSqlDefinition, getIndexLength, getJdbcMetadataName, getQuotedName, getQuotedValue, getSchema, givesCapabilitySQL, preparedStatementPlaceholder, selectLimit, shutdown, tableInitialisationSql, toString, unloadDriverpublic static int oracleTextHack
TEXT
datatype, so we use an arbetary value in a
VARCHAR.public String getStringSqlDefinition(int size) throws SQLException
getStringSqlDefinition in interface DbmsgetStringSqlDefinition in class AnsiStandardsize - the string length (-1 means no limit)SQLExceptionAnsiStandard.getStringSqlDefinition(int)public String getLongSqlDefinition()
DbmsgetLongSqlDefinition in interface DbmsgetLongSqlDefinition in class AnsiStandardpublic String getSqlDefinition(String sqlTypeName)
DbmsgetSqlDefinition in interface DbmsgetSqlDefinition in class AnsiStandardsqlTypeName - the Melati internal type namepublic String sqlBooleanValueOfRaw(Object raw)
DbmssqlBooleanValueOfRaw in interface DbmssqlBooleanValueOfRaw in class AnsiStandardpublic String getBinarySqlDefinition(int size) throws SQLException
DbmsgetBinarySqlDefinition in interface DbmsgetBinarySqlDefinition in class AnsiStandardsize - how big the field isSQLExceptionpublic String unreservedName(String name)
AnsiStandardunreservedName in interface DbmsunreservedName in class AnsiStandardname - the field or table nameDbms.unreservedName(java.lang.String),
MySQL.unreservedName(java.lang.String),
MySQL.melatiName(java.lang.String)public String melatiName(String name)
DbmsmelatiName in interface DbmsmelatiName in class AnsiStandardname - an SQL namepublic <S,O> PoemType<O> canRepresent(PoemType<S> storage, PoemType<O> type)
DbmscanRepresent in interface DbmscanRepresent in class AnsiStandardstorage - the containertype - the type to storepublic SQLPoemType<?> defaultPoemTypeOfColumnMetaData(ResultSet md) throws SQLException
DbmsdefaultPoemTypeOfColumnMetaData in interface DbmsdefaultPoemTypeOfColumnMetaData in class AnsiStandardmd - the JDBC metadataSQLException - potentiallypublic String getForeignKeyDefinition(String tableName, String fieldName, String targetTableName, String targetTableFieldName, String fixName)
DbmsgetForeignKeyDefinition in interface DbmsgetForeignKeyDefinition in class AnsiStandardtableName - the table that this column is in, unquotedfieldName - often the name of the foreign table, unquotedtargetTableName - the table that this is a foreign key into, unquotedtargetTableFieldName - name of the primary key field of the foreign
table, often id, unquotedfixName - name of the IntegrityFixpublic String getPrimaryKeyDefinition(String fieldName)
DbmsgetPrimaryKeyDefinition in interface DbmsgetPrimaryKeyDefinition in class AnsiStandardfieldName - the table Troid column, often id, unquotedpublic String booleanTrueExpression(Column<Boolean> booleanColumn)
DbmsbooleanTrueExpression in interface DbmsbooleanTrueExpression in class AnsiStandardbooleanColumn - the column which should be a booleanpublic String getSqlDefaultValue(SQLType<?> sqlType)
DbmsgetSqlDefaultValue in interface DbmsgetSqlDefaultValue in class AnsiStandardsqlType - the type nameCopyright © 2000–2021 PanEris. All rights reserved.