|
2.9.2: 2009-01-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.dbengine.AbstractDbEngine
public abstract class AbstractDbEngine
An abstract superclass with default implementations for most DbEngine
methods. Subclasses only needs to override methods which behave differently.
Field Summary | |
---|---|
private static Pattern |
valid
A regexp checking for invalid characters. |
Constructor Summary | |
---|---|
AbstractDbEngine()
Create AbstractDbEngine. |
Method Summary | |
---|---|
String |
abs(String value)
Return ABS(<value>) . |
boolean |
checkForInvalidNumberOperation()
Returns FALSE. |
String |
exp(String value)
Return EXP(<value>) . |
String |
getCaseSensitiveVarchar(int length)
Return null. |
boolean |
isValidColumnName(String columnName)
Checks that the name only contains the following characters: a-zA-Z0-9_ It must also start with a letter or underscore. |
protected boolean |
isValidName(String name)
Check that the name only contains a-zA-Z0-9_ and starts with a letter or underscore. |
boolean |
isValidTableName(String tableName)
Checks that the name only contains the following characters: a-zA-Z0-9_ It must also start with a letter or underscore. |
String |
ln(String value)
Return LN(<value>) . |
String |
makeSafeCreateTable(String sql,
String catalog,
String schema,
String table)
Return the SQL unmodified. |
String |
rlike(String value,
String regexp)
Return <value> = <regexp> |
boolean |
selectOrderByColumnsIfDistinct()
Returns FALSE. |
boolean |
supportColumnAliasInGroupBy()
Returns FALSE. |
boolean |
supportColumnAliasInHaving()
Returns FALSE. |
boolean |
supportColumnAliasInOrderBy()
Returns FALSE. |
boolean |
supportsColumnAliasInWhere()
Returns FALSE. |
boolean |
useThetaJoin()
Most databases doesn't. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.dbengine.DbEngine |
---|
analyzeAfterBatchOperation, caseInsensitiveComparison, getAnalyzeTableSql, getCreateIndexSql, getDropIndexSql, getOptimizeTableSql |
Field Detail |
---|
private static final Pattern valid
Constructor Detail |
---|
public AbstractDbEngine()
Method Detail |
---|
public String makeSafeCreateTable(String sql, String catalog, String schema, String table)
makeSafeCreateTable
in interface DbEngine
sql
- The original SQLcatalog
- The name of the catalog (database) where the table is
being create, or null if it is located in the current catalogschema
- The name of the schema where the table is being created, or
null if is located in the current schematable
- The name of the table that is being created
public boolean useThetaJoin()
useThetaJoin
in interface DbEngine
public boolean supportsColumnAliasInWhere()
supportsColumnAliasInWhere
in interface DbEngine
public boolean supportColumnAliasInOrderBy()
supportColumnAliasInOrderBy
in interface DbEngine
public boolean supportColumnAliasInGroupBy()
supportColumnAliasInGroupBy
in interface DbEngine
public boolean supportColumnAliasInHaving()
supportColumnAliasInHaving
in interface DbEngine
public boolean checkForInvalidNumberOperation()
checkForInvalidNumberOperation
in interface DbEngine
public boolean selectOrderByColumnsIfDistinct()
selectOrderByColumnsIfDistinct
in interface DbEngine
public String ln(String value)
LN(<value>)
.
ln
in interface DbEngine
value
- The value to take the logarithm of
public String abs(String value)
ABS(<value>)
.
abs
in interface DbEngine
value
- The value to use in the calculation
public String exp(String value)
EXP(<value>)
.
exp
in interface DbEngine
value
- The value to use in the calculation
public String rlike(String value, String regexp)
<value> = <regexp>
rlike
in interface DbEngine
value
- The left valueregexp
- The regular expression as a string
public boolean isValidTableName(String tableName)
isValidTableName
in interface DbEngine
tableName
- The string to check
public boolean isValidColumnName(String columnName)
isValidColumnName
in interface DbEngine
columnName
- The string to check
public String getCaseSensitiveVarchar(int length)
getCaseSensitiveVarchar
in interface DbEngine
length
- The maximum length that needs to be stored in the column
protected boolean isValidName(String name)
|
2.9.2: 2009-01-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |