|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.db.BaseDatabaseType
com.j256.ormlite.db.HsqldbDatabaseType
public class HsqldbDatabaseType
HyberSQL database type information used to create the tables, etc..
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.j256.ormlite.db.BaseDatabaseType |
|---|
BaseDatabaseType.BooleanNumberFieldConverter |
| Field Summary |
|---|
| Fields inherited from class com.j256.ormlite.db.BaseDatabaseType |
|---|
booleanConverter |
| Constructor Summary | |
|---|---|
HsqldbDatabaseType()
|
|
| Method Summary | |
|---|---|
protected void |
appendBooleanType(StringBuilder sb)
Output the SQL type for a Java boolean. |
void |
appendEscapedEntityName(StringBuilder sb,
String word)
Add a entity-name word to the string builder wrapped in the proper characters to escape it. |
void |
appendLimitValue(StringBuilder sb,
int limit)
Append to the string builder the necessary SQL to limit the results to a certain number. |
protected void |
appendObjectType(StringBuilder sb)
Output the SQL type for a Java object. |
void |
appendSelectNextValFromSequence(StringBuilder sb,
String sequenceName)
Append the SQL necessary to get the next-value from a sequence. |
protected void |
configureGeneratedIdSequence(StringBuilder sb,
FieldType fieldType,
List<String> statementsBefore,
List<String> additionalArgs,
List<String> queriesAfter)
Output the SQL necessary to configure a generated-id column. |
void |
dropColumnArg(FieldType fieldType,
List<String> statementsBefore,
List<String> statementsAfter)
Takes a FieldType and adds the necessary statements to the before and after lists necessary so that the
dropping of the table will succeed and will clear other associated sequences or other database artifacts |
String |
getDriverClassName()
Return the class name of the database driver. |
String |
getDriverUrlPart()
Return the part in the database URI which identifies the particular database. |
boolean |
isEntityNamesMustBeUpCase()
Returns true if table and field names should be made uppercase. |
boolean |
isIdSequenceNeeded()
Return true if the database needs a sequence when you use generated IDs. |
boolean |
isLimitAfterSelect()
Return true if the LIMIT should be called after SELECT otherwise at the end of the WHERE (the default). |
boolean |
isVarcharFieldWidthSupported()
Return true if the database supports the width parameter on VARCHAR fields. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.j256.ormlite.db.DatabaseType |
|---|
appendColumnArg, appendCreateTableSuffix, appendEscapedWord, buildDatabaseAccess, convertColumnName, generateIdSequenceName, getCommentLinePrefix, getFieldConverter, isCreateTableReturnsZero, isLimitSqlSupported, loadDriver |
| Constructor Detail |
|---|
public HsqldbDatabaseType()
| Method Detail |
|---|
public String getDriverUrlPart()
DatabaseType
getDriverUrlPart in interface DatabaseTypepublic String getDriverClassName()
DatabaseType
getDriverClassName in interface DatabaseTypeprotected void appendBooleanType(StringBuilder sb)
BaseDatabaseType
appendBooleanType in class BaseDatabaseTypeprotected void appendObjectType(StringBuilder sb)
BaseDatabaseType
appendObjectType in class BaseDatabaseType
protected void configureGeneratedIdSequence(StringBuilder sb,
FieldType fieldType,
List<String> statementsBefore,
List<String> additionalArgs,
List<String> queriesAfter)
BaseDatabaseType
configureGeneratedIdSequence in class BaseDatabaseType
public void appendEscapedEntityName(StringBuilder sb,
String word)
DatabaseType
appendEscapedEntityName in interface DatabaseTypeappendEscapedEntityName in class BaseDatabaseType
public void dropColumnArg(FieldType fieldType,
List<String> statementsBefore,
List<String> statementsAfter)
DatabaseTypeFieldType and adds the necessary statements to the before and after lists necessary so that the
dropping of the table will succeed and will clear other associated sequences or other database artifacts
dropColumnArg in interface DatabaseTypedropColumnArg in class BaseDatabaseTypepublic boolean isIdSequenceNeeded()
DatabaseType
isIdSequenceNeeded in interface DatabaseTypeisIdSequenceNeeded in class BaseDatabaseTypepublic boolean isVarcharFieldWidthSupported()
DatabaseType
isVarcharFieldWidthSupported in interface DatabaseTypeisVarcharFieldWidthSupported in class BaseDatabaseTypepublic boolean isLimitAfterSelect()
DatabaseType
isLimitAfterSelect in interface DatabaseTypeisLimitAfterSelect in class BaseDatabaseType
public void appendLimitValue(StringBuilder sb,
int limit)
DatabaseType
appendLimitValue in interface DatabaseTypeappendLimitValue in class BaseDatabaseType
public void appendSelectNextValFromSequence(StringBuilder sb,
String sequenceName)
DatabaseTypeDatabaseType.isIdSequenceNeeded() is true.
appendSelectNextValFromSequence in interface DatabaseTypeappendSelectNextValFromSequence in class BaseDatabaseTypepublic boolean isEntityNamesMustBeUpCase()
DatabaseTypeTurns out that Derby and Hsqldb are doing something wrong (IMO) with entity names. If you create a table with the name "footable" (with the quotes) then it will be created as lowercase footable, case sensitive. However, if you then issue the query 'select * from footable' it won't find the table because it gets promoted to be FOOTABLE and is searched in a case sensitive manner. So for these databases, entity names have to be forced to be uppercase so external queries will also work.
isEntityNamesMustBeUpCase in interface DatabaseTypeisEntityNamesMustBeUpCase in class BaseDatabaseType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||