|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.melati.poem.dbms.AnsiStandard
org.melati.poem.dbms.Oracle
public class Oracle
A Driver for Oracle (http://www.oracle.com/).
| Nested Class Summary | |
|---|---|
static class |
Oracle.OracleBooleanPoemType
Translates an Oracle Boolean into a Poem BooleanPoemType. |
static class |
Oracle.OracleStringPoemType
Translates a Oracle String into a Poem StringPoemType. |
| Field Summary | |
|---|---|
static int |
oracleTextHack
Oracle does not have a pleasant TEXT
datatype, so we use an arbetary value in a
VARCHAR. |
| Fields inherited from class org.melati.poem.dbms.AnsiStandard |
|---|
schema |
| Constructor Summary | |
|---|---|
Oracle()
Constructor. |
|
| Method Summary | |
|---|---|
String |
booleanTrueExpression(Column booleanColumn)
Accomodate lack of boolean types. |
PoemType |
canRepresent(PoemType storage,
PoemType 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)
Accomodate 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()
Accomodate 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)
Accomodate String / Text distinction. |
String |
melatiName(String name)
Reverse the mapping in unreservedName. |
String |
sqlBooleanValueOfRaw(Object raw)
Accomodate 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int oracleTextHack
TEXT
datatype, so we use an arbetary value in a
VARCHAR.
| Constructor Detail |
|---|
public Oracle()
| Method Detail |
|---|
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 name
AnsiStandard.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 is
SQLExceptionAnsiStandard.getBinarySqlDefinition(int)public String unreservedName(String name)
unreservedName in interface DbmsunreservedName in class AnsiStandardname - the field or table name
AnsiStandard.unreservedName(java.lang.String)public String melatiName(String name)
melatiName in interface DbmsmelatiName in class AnsiStandardname - an SQL name
AnsiStandard.melatiName(java.lang.String)
public PoemType canRepresent(PoemType storage,
PoemType type)
canRepresent in interface DbmscanRepresent in class AnsiStandardstorage - the POEM native typetype - the current type
(org.melati.poem.PoemType, org.melati.poem.PoemType)
public SQLPoemType defaultPoemTypeOfColumnMetaData(ResultSet md)
throws SQLException
defaultPoemTypeOfColumnMetaData in interface DbmsdefaultPoemTypeOfColumnMetaData in class AnsiStandardmd - the JDBC metadata
SQLException - 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 IntegrityFix
AnsiStandard.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, unquoted
AnsiStandard.getPrimaryKeyDefinition(java.lang.String)public String booleanTrueExpression(Column booleanColumn)
booleanTrueExpression in interface DbmsbooleanTrueExpression in class AnsiStandardDbms.booleanTrueExpression(org.melati.poem.Column)public String getSqlDefaultValue(SQLType sqlType)
getSqlDefaultValue in interface DbmsgetSqlDefaultValue in class AnsiStandardsqlType - the type name
AnsiStandard.getSqlDefaultValue(org.melati.poem.SQLType)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||