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 |
getSchema()
Get the user we are connected as and return that as the schema.
|
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 / Text 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, givesCapabilitySQL, preparedStatementPlaceholder, selectLimit, shutdown, tableInitialisationSql, toString, unloadDriverpublic static int oracleTextHack
TEXT
datatype, so we use an arbetary value in a
VARCHAR.public String getSchema()
getSchema in interface DbmsgetSchema in class AnsiStandardAnsiStandard.getSchema(),
Dbms.getSchema()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()
getLongSqlDefinition in interface DbmsgetLongSqlDefinition in class AnsiStandardAnsiStandard.getLongSqlDefinition()public String getSqlDefinition(String sqlTypeName)
getSqlDefinition in interface DbmsgetSqlDefinition in class AnsiStandardsqlTypeName - the Melati internal type nameAnsiStandard.getSqlDefinition(java.lang.String)public String sqlBooleanValueOfRaw(Object raw)
sqlBooleanValueOfRaw in interface DbmssqlBooleanValueOfRaw in class AnsiStandardAnsiStandard.sqlBooleanValueOfRaw(java.lang.Object)public String getBinarySqlDefinition(int size) throws SQLException
getBinarySqlDefinition in interface DbmsgetBinarySqlDefinition in class AnsiStandardsize - how big the field isSQLExceptionAnsiStandard.getBinarySqlDefinition(int)public String unreservedName(String name)
unreservedName in interface DbmsunreservedName in class AnsiStandardname - the field or table nameAnsiStandard.unreservedName(java.lang.String)public String melatiName(String name)
melatiName in interface DbmsmelatiName in class AnsiStandardname - an SQL nameAnsiStandard.melatiName(java.lang.String)public <S,O> PoemType<O> canRepresent(PoemType<S> storage, PoemType<O> type)
canRepresent in interface DbmscanRepresent in class AnsiStandardstorage - the containertype - the type to store(org.melati.poem.PoemType, org.melati.poem.PoemType)public SQLPoemType<?> defaultPoemTypeOfColumnMetaData(ResultSet md) throws SQLException
defaultPoemTypeOfColumnMetaData in interface DbmsdefaultPoemTypeOfColumnMetaData in class AnsiStandardmd - the JDBC metadataSQLException - potentiallyAnsiStandard.defaultPoemTypeOfColumnMetaData(java.sql.ResultSet)public String getForeignKeyDefinition(String tableName, String fieldName, String targetTableName, String targetTableFieldName, String fixName)
getForeignKeyDefinition 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 IntegrityFixAnsiStandard.getForeignKeyDefinition(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public String getPrimaryKeyDefinition(String fieldName)
getPrimaryKeyDefinition in interface DbmsgetPrimaryKeyDefinition in class AnsiStandardfieldName - the table Troid column, often id, unquotedAnsiStandard.getPrimaryKeyDefinition(java.lang.String)public String booleanTrueExpression(Column<Boolean> booleanColumn)
booleanTrueExpression in interface DbmsbooleanTrueExpression in class AnsiStandardbooleanColumn - the column which should be a booleanDbms.booleanTrueExpression(org.melati.poem.Column)public String getSqlDefaultValue(SQLType<?> sqlType)
getSqlDefaultValue in interface DbmsgetSqlDefaultValue in class AnsiStandardsqlType - the type nameAnsiStandard.getSqlDefaultValue(org.melati.poem.SQLType)Copyright © 2000–2015 PanEris. All rights reserved.