|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Dbms
getSchema
in class AnsiStandard
AnsiStandard.getSchema()
,
Dbms.getSchema()
public String getStringSqlDefinition(int size) throws SQLException
getStringSqlDefinition
in interface Dbms
getStringSqlDefinition
in class AnsiStandard
size
- the string length (-1 means no limit)
SQLException
AnsiStandard.getStringSqlDefinition(int)
public String getLongSqlDefinition()
getLongSqlDefinition
in interface Dbms
getLongSqlDefinition
in class AnsiStandard
AnsiStandard.getLongSqlDefinition()
public String getSqlDefinition(String sqlTypeName)
getSqlDefinition
in interface Dbms
getSqlDefinition
in class AnsiStandard
sqlTypeName
- the Melati internal type name
AnsiStandard.getSqlDefinition(java.lang.String)
public String sqlBooleanValueOfRaw(Object raw)
sqlBooleanValueOfRaw
in interface Dbms
sqlBooleanValueOfRaw
in class AnsiStandard
AnsiStandard.sqlBooleanValueOfRaw(java.lang.Object)
public String getBinarySqlDefinition(int size) throws SQLException
getBinarySqlDefinition
in interface Dbms
getBinarySqlDefinition
in class AnsiStandard
size
- how big the field is
SQLException
AnsiStandard.getBinarySqlDefinition(int)
public String unreservedName(String name)
unreservedName
in interface Dbms
unreservedName
in class AnsiStandard
name
- the field or table name
AnsiStandard.unreservedName(java.lang.String)
public String melatiName(String name)
melatiName
in interface Dbms
melatiName
in class AnsiStandard
name
- an SQL name
AnsiStandard.melatiName(java.lang.String)
public PoemType canRepresent(PoemType storage, PoemType type)
canRepresent
in interface Dbms
canRepresent
in class AnsiStandard
storage
- 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 Dbms
defaultPoemTypeOfColumnMetaData
in class AnsiStandard
md
- 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 Dbms
getForeignKeyDefinition
in class AnsiStandard
tableName
- 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 Dbms
getPrimaryKeyDefinition
in class AnsiStandard
fieldName
- the table Troid column, often id, unquoted
AnsiStandard.getPrimaryKeyDefinition(java.lang.String)
public String booleanTrueExpression(Column booleanColumn)
booleanTrueExpression
in interface Dbms
booleanTrueExpression
in class AnsiStandard
Dbms.booleanTrueExpression(org.melati.poem.Column)
public String getSqlDefaultValue(SQLType sqlType)
getSqlDefaultValue
in interface Dbms
getSqlDefaultValue
in class AnsiStandard
sqlType
- 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 |