|
||||||||||
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.Hsqldb
public class Hsqldb
A Driver for HSQLDB (http://www.hsqldb.org/). Note that HSQLDB uppercases any name that isn't quoted.
Field Summary | |
---|---|
static int |
hsqldbTextHack
HSQLDB 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 | |
---|---|
Hsqldb()
Constructor. |
Method Summary | |
---|---|
PoemType |
canRepresent(PoemType storage,
PoemType type)
Accomodate our String size hack. |
String |
caseInsensitiveRegExpSQL(String term1,
String term2)
Note that this is NOT case insensitive. |
String |
createTableTypeQualifierSql(Table table)
The default is to keep everything in memory, this allows for the db to be written to the disk. |
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 |
getJdbcMetadataName(String name)
Bad smell. |
String |
getLongSqlDefinition()
Accomodate Long / Bigint deviants. |
String |
getStringSqlDefinition(int size)
Accomodate String / Text distinction. |
String |
melatiName(String name)
Reverse the mapping in unreservedName. |
void |
shutdown(Connection connection)
Shut the db down nicely. |
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 hsqldbTextHack
TEXT
datatype, so we use an arbetary value in a
VARCHAR
.
Constructor Detail |
---|
public Hsqldb()
Method Detail |
---|
public void shutdown(Connection connection) throws SQLException
shutdown
in interface Dbms
shutdown
in class AnsiStandard
SQLException
org.melati.poem.dbms.Dbms#disconnect()
public String createTableTypeQualifierSql(Table table)
createTableTypeQualifierSql
in interface Dbms
createTableTypeQualifierSql
in class AnsiStandard
org.melati.poem.dbms.Dbms#createTableSql()
,
org.melati.poem.dbms.AnsiStandard#createTableSql()
public String getStringSqlDefinition(int size)
getStringSqlDefinition
in interface Dbms
getStringSqlDefinition
in class AnsiStandard
size
- the string length (-1 means no limit)
AnsiStandard.getStringSqlDefinition(int)
public String getLongSqlDefinition()
getLongSqlDefinition
in interface Dbms
getLongSqlDefinition
in class AnsiStandard
AnsiStandard.getLongSqlDefinition()
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 PoemType canRepresent(PoemType storage, PoemType type)
canRepresent
in interface Dbms
canRepresent
in class AnsiStandard
storage
- the POEM native typetype
- the current type
AnsiStandard.canRepresent(org.melati.poem.PoemType>, org.melati.poem.PoemType>)
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 String caseInsensitiveRegExpSQL(String term1, String term2)
caseInsensitiveRegExpSQL
in interface Dbms
caseInsensitiveRegExpSQL
in class AnsiStandard
term1
- the term to find interm2
- the quoted term to find
Dbms.caseInsensitiveRegExpSQL(java.lang.String, java.lang.String)
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 getJdbcMetadataName(String name)
getJdbcMetadataName
in interface Dbms
getJdbcMetadataName
in class AnsiStandard
name
- entity name such as tableinfo
AnsiStandard.getJdbcMetadataName(java.lang.String)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |