|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.dbengine.AbstractDbEngine net.sf.basedb.core.dbengine.PostgresDbEngine
public class PostgresDbEngine
Database engine for Postgres.
Constructor Summary | |
---|---|
PostgresDbEngine()
Create PostgresDbEngine. |
Method Summary | |
---|---|
boolean |
analyzeAfterBatchOperation()
Return true. |
boolean |
caseInsensitiveComparison()
Returns FALSE. |
boolean |
checkForInvalidNumberOperation()
Returns TRUE. |
String |
getAnalyzeTableSql(String catalog,
String schema,
String table)
Generate ANALYZE <schema>. |
String |
getCreateIndexSql(String catalog,
String schema,
String table,
String name,
Set<String> columns,
boolean unique)
Generate ALTER TABLE <schema>. |
String |
getDropIndexSql(String catalog,
String schema,
String table,
String name,
boolean unique)
Generate ALTER TABLE <schema>. |
String |
getOptimizeTableSql(String catalog,
String schema,
String table)
Generate VACUUM FULL <schema>. |
private String |
getQuotedName(String name)
Put quotes (") around the name. |
String |
inspectSchemaGenerationSQL(String sql,
org.hibernate.dialect.Dialect dialect,
boolean update)
Skip all "create index" statements since Hibernate doesn't generate those with unique names. |
String |
rlike(String value,
String regexp)
Return <value> ~ <regexp> . |
boolean |
selectOrderByColumnsIfDistinct()
Returns TRUE. |
boolean |
supportColumnAliasInGroupBy()
Returns TRUE. |
boolean |
supportColumnAliasInHaving()
Returns FALSE. |
boolean |
supportColumnAliasInOrderBy()
Returns TRUE. |
boolean |
supportsColumnAliasInWhere()
Returns FALSE. |
boolean |
useThetaJoin()
Always false. |
Methods inherited from class net.sf.basedb.core.dbengine.AbstractDbEngine |
---|
abs, castToDate, exp, getCaseSensitiveVarchar, isValidColumnName, isValidName, isValidTableName, ln, makeSafeCreateTable, power |
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 |
---|
abs, castToDate, exp, getCaseSensitiveVarchar, isValidColumnName, isValidTableName, ln, makeSafeCreateTable, power |
Constructor Detail |
---|
public PostgresDbEngine()
Method Detail |
---|
public boolean useThetaJoin()
useThetaJoin
in interface DbEngine
useThetaJoin
in class AbstractDbEngine
public String getCreateIndexSql(String catalog, String schema, String table, String name, Set<String> columns, boolean unique)
ALTER TABLE <schema>.<table> ADD CONSTRAINT <name>
UNIQUE (<columns>)
for a unique index,
CREATE INDEX <schema>.<name> ON <schema>.<table> (<columns>)
for other indexes.
The catalog parameter is not supported.
getCreateIndexSql
in interface DbEngine
catalog
- The name of the catalog (database) where the table is
located, or null if it is located in the current catalogschema
- The name of the schema where the table is located, or
null if is located in the current schematable
- The name of the tablename
- The name of the index to be createdcolumns
- The name of the columns in the indexunique
- If the index must contain unique values or not
public String getDropIndexSql(String catalog, String schema, String table, String name, boolean unique)
ALTER TABLE <schema>.<table> DROP CONSTRAINT <name>
for unique indexes, DROP INDEX <schema>.<name>
for other indexes.
The catalog parameter is not supported.
getDropIndexSql
in interface DbEngine
catalog
- The name of the catalog (database) where the table is
located, or null if it is located in the current catalogschema
- The name of the schema where the table is located, or
null if is located in the current schematable
- The name of the tablename
- The name of the indexunique
- If the index contains unique values or not
public boolean analyzeAfterBatchOperation()
analyzeAfterBatchOperation
in interface DbEngine
public String getOptimizeTableSql(String catalog, String schema, String table)
VACUUM FULL <schema>.<table>
.
The catalog parameter is not supported.
getOptimizeTableSql
in interface DbEngine
catalog
- The name of the catalog (database) where the table is
located, or null if it is located in the current catalogschema
- The name of the schema where the table is located, or
null if is located in the current schematable
- The name of the table to optimize
DbEngine.getAnalyzeTableSql(String, String, String)
public String getAnalyzeTableSql(String catalog, String schema, String table)
ANALYZE <schema>.<table>
.
The catalog parameter is not supported.
getAnalyzeTableSql
in interface DbEngine
catalog
- The name of the catalog (database) where the table is
located, or null if it is located in the current catalogschema
- The name of the schema where the table is located, or
null if is located in the current schematable
- The name of the table to analyze
DbEngine.getOptimizeTableSql(String, String, String)
public boolean caseInsensitiveComparison()
caseInsensitiveComparison
in interface DbEngine
public boolean supportsColumnAliasInWhere()
supportsColumnAliasInWhere
in interface DbEngine
supportsColumnAliasInWhere
in class AbstractDbEngine
public boolean supportColumnAliasInOrderBy()
supportColumnAliasInOrderBy
in interface DbEngine
supportColumnAliasInOrderBy
in class AbstractDbEngine
public boolean supportColumnAliasInGroupBy()
supportColumnAliasInGroupBy
in interface DbEngine
supportColumnAliasInGroupBy
in class AbstractDbEngine
public boolean supportColumnAliasInHaving()
supportColumnAliasInHaving
in interface DbEngine
supportColumnAliasInHaving
in class AbstractDbEngine
public boolean checkForInvalidNumberOperation()
checkForInvalidNumberOperation
in interface DbEngine
checkForInvalidNumberOperation
in class AbstractDbEngine
public boolean selectOrderByColumnsIfDistinct()
selectOrderByColumnsIfDistinct
in interface DbEngine
selectOrderByColumnsIfDistinct
in class AbstractDbEngine
public String rlike(String value, String regexp)
<value> ~ <regexp>
.
rlike
in interface DbEngine
rlike
in class AbstractDbEngine
value
- The left valueregexp
- The regular expression as a string
public String inspectSchemaGenerationSQL(String sql, org.hibernate.dialect.Dialect dialect, boolean update)
inspectSchemaGenerationSQL
in interface DbEngine
inspectSchemaGenerationSQL
in class AbstractDbEngine
sql
- The original SQL statment as generated by Hibernatedialect
- The Hibernate dialect currently in useupdate
- TRUE if we are updating an existing database,
FALSE if we are creating a new one
private String getQuotedName(String name)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |