public class PostgreSQLDB extends BaseDB
ALTER_COLUMN_NAME, ALTER_COLUMN_TYPE, ALTER_TABLE_NAME, columnTypePattern, CREATE_TABLE, DROP_INDEX, DROP_PRIMARY_KEY, RENAME_TABLE_TEMPLATE, REWORD_TEMPLATE, SQL_VARCHAR_TYPES, TEMPLATE| Constructor and Description |
|---|
PostgreSQLDB(int majorVersion,
int minorVersion) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildSQL(String template) |
protected void |
createSyncDeleteTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames) |
protected void |
createSyncInsertTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourceColumnNames,
String[] targetColumnNames,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames,
Map<String,String> defaultValuesMap) |
protected void |
createSyncUpdateTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourceColumnNames,
String[] targetColumnNames,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames,
Map<String,String> defaultValuesMap) |
protected void |
dropTrigger(Connection connection,
String tableName,
String triggerName) |
protected String |
getCopyTableStructureSQL(String tableName,
String newTableName) |
static String |
getCreateRulesSQL(String tableName,
String columnName) |
List<com.liferay.portal.kernel.dao.db.Index> |
getIndexes(Connection connection) |
String |
getNewUuidFunctionName() |
String |
getPopulateSQL(String databaseName,
String sqlContent) |
String |
getRecreateSQL(String databaseName) |
protected int[] |
getSQLTypes() |
protected Map<String,Integer> |
getSQLVarcharSizes() |
protected String[] |
getTemplate() |
boolean |
isSupportsDBPartition() |
protected boolean |
isSupportsDuplicatedIndexName() |
boolean |
isSupportsNewUuidFunction() |
boolean |
isSupportsQueryingAfterException() |
protected String |
limitColumnLength(String column,
int length) |
protected String |
reword(String data) |
addIndexes, addPrimaryKey, alterColumnName, alterColumnType, alterTableAddColumn, alterTableDropColumn, buildColumnNameTokens, buildColumnTypeTokens, buildTableNameTokens, copyTableRows, copyTableStructure, doRenameTables, dropIndexes, dropIndexes, getDBType, getDefaultValue, getIndexes, getIndexResultSet, getMajorVersion, getMinorVersion, getPrimaryKeyColumnNames, getRenameTableSQL, getSQLType, getSQLTypeDecimalDigits, getSQLTypeSize, getTemplateBlob, getTemplateFalse, getTemplateTrue, getVersionString, isSupportsAlterColumnName, isSupportsAlterColumnType, isSupportsDDLRollback, isSupportsInlineDistinct, isSupportsScrollableResults, isSupportsStringCaseSensitiveQuery, isSupportsUpdateWithInnerJoin, process, removePrimaryKey, renameTables, replaceTemplate, runSQL, runSQL, runSQL, runSQL, runSQLTemplate, runSQLTemplate, setSupportsStringCaseSensitiveQuery, syncTables, updateIndexespublic static String getCreateRulesSQL(String tableName,
String columnName)
public String buildSQL(String template)
throws IOException
public List<com.liferay.portal.kernel.dao.db.Index> getIndexes(Connection connection)
throws SQLException
getIndexes in interface com.liferay.portal.kernel.dao.db.DBgetIndexes in class BaseDBSQLExceptionpublic String getNewUuidFunctionName()
public String getPopulateSQL(String databaseName,
String sqlContent)
public String getRecreateSQL(String databaseName)
public boolean isSupportsDBPartition()
isSupportsDBPartition in interface com.liferay.portal.kernel.dao.db.DBisSupportsDBPartition in class BaseDBpublic boolean isSupportsNewUuidFunction()
public boolean isSupportsQueryingAfterException()
isSupportsQueryingAfterException in interface com.liferay.portal.kernel.dao.db.DBisSupportsQueryingAfterException in class BaseDBprotected void createSyncDeleteTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames)
throws Exception
createSyncDeleteTrigger in class BaseDBExceptionprotected void createSyncInsertTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourceColumnNames,
String[] targetColumnNames,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames,
Map<String,String> defaultValuesMap)
throws Exception
createSyncInsertTrigger in class BaseDBExceptionprotected void createSyncUpdateTrigger(Connection connection,
String sourceTableName,
String targetTableName,
String triggerName,
String[] sourceColumnNames,
String[] targetColumnNames,
String[] sourcePrimaryKeyColumnNames,
String[] targetPrimaryKeyColumnNames,
Map<String,String> defaultValuesMap)
throws Exception
createSyncUpdateTrigger in class BaseDBExceptionprotected void dropTrigger(Connection connection,
String tableName,
String triggerName)
throws Exception
dropTrigger in class BaseDBExceptionprotected String getCopyTableStructureSQL(String tableName,
String newTableName)
getCopyTableStructureSQL in class BaseDBprotected int[] getSQLTypes()
getSQLTypes in class BaseDBprotected Map<String,Integer> getSQLVarcharSizes()
getSQLVarcharSizes in class BaseDBprotected String[] getTemplate()
getTemplate in class BaseDBprotected boolean isSupportsDuplicatedIndexName()
isSupportsDuplicatedIndexName in class BaseDBprotected String limitColumnLength(String column,
int length)
limitColumnLength in class BaseDB