@ProviderType
public interface DB
Modifier and Type | Field and Description |
---|---|
static int |
SQL_SIZE_NONE |
static int |
SQL_VARCHAR_MAX_SIZE |
static int |
SQL_VARCHAR_MAX_SIZE_THRESHOLD |
Modifier and Type | Method and Description |
---|---|
void |
addIndexes(Connection connection,
List<IndexMetadata> indexMetadatas) |
void |
alterColumnName(Connection connection,
String tableName,
String oldColumnName,
String newColumnDefinition) |
void |
alterColumnType(Connection connection,
String tableName,
String columnName,
String newColumnType) |
void |
alterTableAddColumn(Connection connection,
String tableName,
String columnName,
String columnType) |
void |
alterTableDropColumn(Connection connection,
String tableName,
String columnName) |
String |
buildSQL(String template) |
void |
copyTableRows(Connection connection,
String sourceTableName,
String targetTableName,
Map<String,String> columnNamesMap,
Map<String,String> defaultValuesMap) |
void |
copyTableStructure(Connection connection,
String tableName,
String newTableName) |
List<IndexMetadata> |
dropIndexes(Connection connection,
String tableName,
String columnName) |
DBType |
getDBType() |
String |
getDefaultValue(String columnDef) |
List<Index> |
getIndexes(Connection connection) |
ResultSet |
getIndexResultSet(Connection connection,
String tableName,
boolean onlyUnique) |
int |
getMajorVersion() |
int |
getMinorVersion() |
default String |
getNewUuidFunctionName() |
String |
getPopulateSQL(String databaseName,
String sqlContent) |
String[] |
getPrimaryKeyColumnNames(Connection connection,
String tableName) |
String |
getRecreateSQL(String databaseName) |
Integer |
getSQLType(String templateType) |
Integer |
getSQLTypeDecimalDigits(String templateType) |
Integer |
getSQLTypeSize(String templateType) |
String |
getTemplateBlob() |
String |
getTemplateFalse() |
String |
getTemplateTrue() |
String |
getVersionString() |
boolean |
isSupportsAlterColumnName() |
boolean |
isSupportsAlterColumnType() |
boolean |
isSupportsDBPartition() |
boolean |
isSupportsInlineDistinct() |
default boolean |
isSupportsNewUuidFunction() |
boolean |
isSupportsQueryingAfterException() |
boolean |
isSupportsScrollableResults() |
boolean |
isSupportsStringCaseSensitiveQuery() |
boolean |
isSupportsUpdateWithInnerJoin() |
void |
process(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) |
void |
removePrimaryKey(Connection connection,
String tableName) |
void |
renameTables(Connection connection,
ObjectValuePair<String,String>... tableNameObjectValuePairs) |
default void |
runSQL(Connection connection,
DBTypeToSQLMap dbTypeToSQLMap) |
void |
runSQL(Connection connection,
String sql) |
void |
runSQL(Connection connection,
String[] sqls) |
default void |
runSQL(DBTypeToSQLMap dbTypeToSQLMap) |
void |
runSQL(String sql) |
void |
runSQL(String[] sqls) |
void |
runSQLTemplateString(Connection connection,
String template,
boolean failOnError) |
void |
runSQLTemplateString(String template,
boolean failOnError) |
void |
setSupportsStringCaseSensitiveQuery(boolean supportsStringCaseSensitiveQuery) |
AutoCloseable |
syncTables(Connection connection,
String sourceTableName,
String targetTableName,
Map<String,String> columnNamesMap,
Map<String,String> defaultValuesMap) |
void |
updateIndexes(Connection connection,
String tableName,
String indexesSQL,
boolean dropStaleIndexes) |
static final int SQL_SIZE_NONE
static final int SQL_VARCHAR_MAX_SIZE
static final int SQL_VARCHAR_MAX_SIZE_THRESHOLD
void addIndexes(Connection connection, List<IndexMetadata> indexMetadatas) throws IOException, SQLException
IOException
SQLException
void alterColumnName(Connection connection, String tableName, String oldColumnName, String newColumnDefinition) throws Exception
Exception
void alterColumnType(Connection connection, String tableName, String columnName, String newColumnType) throws Exception
Exception
void alterTableAddColumn(Connection connection, String tableName, String columnName, String columnType) throws Exception
Exception
void alterTableDropColumn(Connection connection, String tableName, String columnName) throws Exception
Exception
String buildSQL(String template) throws IOException, SQLException
IOException
SQLException
void copyTableRows(Connection connection, String sourceTableName, String targetTableName, Map<String,String> columnNamesMap, Map<String,String> defaultValuesMap) throws Exception
Exception
void copyTableStructure(Connection connection, String tableName, String newTableName) throws Exception
Exception
List<IndexMetadata> dropIndexes(Connection connection, String tableName, String columnName) throws IOException, SQLException
IOException
SQLException
DBType getDBType()
String getDefaultValue(String columnDef)
List<Index> getIndexes(Connection connection) throws SQLException
SQLException
ResultSet getIndexResultSet(Connection connection, String tableName, boolean onlyUnique) throws SQLException
SQLException
int getMajorVersion()
int getMinorVersion()
default String getNewUuidFunctionName()
String getPopulateSQL(String databaseName, String sqlContent)
String[] getPrimaryKeyColumnNames(Connection connection, String tableName) throws SQLException
SQLException
String getRecreateSQL(String databaseName)
Integer getSQLType(String templateType)
Integer getSQLTypeDecimalDigits(String templateType)
Integer getSQLTypeSize(String templateType)
String getTemplateBlob()
String getTemplateFalse()
String getTemplateTrue()
String getVersionString()
boolean isSupportsAlterColumnName()
boolean isSupportsAlterColumnType()
boolean isSupportsDBPartition()
boolean isSupportsInlineDistinct()
default boolean isSupportsNewUuidFunction()
boolean isSupportsQueryingAfterException()
boolean isSupportsScrollableResults()
boolean isSupportsStringCaseSensitiveQuery()
boolean isSupportsUpdateWithInnerJoin()
void process(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) throws Exception
Exception
void removePrimaryKey(Connection connection, String tableName) throws Exception
Exception
void renameTables(Connection connection, ObjectValuePair<String,String>... tableNameObjectValuePairs) throws Exception
Exception
default void runSQL(Connection connection, DBTypeToSQLMap dbTypeToSQLMap) throws IOException, SQLException
IOException
SQLException
void runSQL(Connection connection, String sql) throws IOException, SQLException
IOException
SQLException
void runSQL(Connection connection, String[] sqls) throws IOException, SQLException
IOException
SQLException
default void runSQL(DBTypeToSQLMap dbTypeToSQLMap) throws IOException, SQLException
IOException
SQLException
void runSQL(String sql) throws IOException, SQLException
IOException
SQLException
void runSQL(String[] sqls) throws IOException, SQLException
IOException
SQLException
void runSQLTemplateString(Connection connection, String template, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
IOException
javax.naming.NamingException
SQLException
void runSQLTemplateString(String template, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
IOException
javax.naming.NamingException
SQLException
void setSupportsStringCaseSensitiveQuery(boolean supportsStringCaseSensitiveQuery)
AutoCloseable syncTables(Connection connection, String sourceTableName, String targetTableName, Map<String,String> columnNamesMap, Map<String,String> defaultValuesMap) throws Exception
Exception
void updateIndexes(Connection connection, String tableName, String indexesSQL, boolean dropStaleIndexes) throws Exception
Exception