Package com.im.commons.db
Interface DatabasePlatform
-
- All Known Subinterfaces:
DatabasePlatformX
- All Known Implementing Classes:
AbstractDatabasePlatform
public interface DatabasePlatform
- Author:
- Martin Adamek
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IJC_API_KEYS_TABLE_NAME
Name of table for API keysstatic java.lang.String
IJC_CONNECT_ITEMS_TABLE_NAME
Name of table for Connect custom itemsstatic java.lang.String
IJC_CONNECT_STRUCTURES_TABLE_NAME
Name of table for structure id mapping for Connectstatic java.lang.String
IJC_SCHEMA_OTHER_SHARING_TABLE_NAME
Name of table containing info about sharing of custom items (scripts etc.).static java.lang.String
IJC_SCHEMA_OTHER_TABLE_NAME
Name of table for lists, scripts, queries etc.static java.lang.String
NAME_PRIMARY_KEY_CONSTRAINT
Marker for a constraint that enforces the primary key.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DBColInfo
buildColumnInfoForColumn(java.lang.String dbSchemaName, java.lang.String tableName, java.lang.String columnName)
Build the DBColInfos for the particlaar column.java.util.List<DBColInfo>
buildColumnInfosForTable(java.lang.String dbSchemaName, java.lang.String tableName)
Build the DBColInfos for the table.java.util.List<DBConstraintInfo>
buildConstraintInfosForTable(java.lang.String dbSchemaName, java.lang.String tableName, java.util.List<DBColInfo> cols, boolean useCache)
Retrieves unique constraints declared for the table.java.util.List<DBForeignKeyInfo>
buildExportedForeignKeyInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build exported foreign key info.java.util.List<DBForeignKeyInfo>
buildImportedForeignKeyInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build imported foreign key info.java.util.List<DBIndexInfo>
buildIndexInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build index info for the specified table.java.util.Set<java.lang.String>
buildJChemPropertyTableNames()
Build the known JChem property table names.java.util.List<DBSequenceInfo>
buildSequenceInfo(java.lang.String schema)
DBSequenceInfo
buildSequenceInfo(java.lang.String schema, java.lang.String seqName)
DBTableInfo
buildTableInfo(java.lang.String schema, java.lang.String table, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
Build the full table info for this table.DBTableInfo
buildTableInfoFull(java.lang.String schema, java.lang.String table, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
java.util.Map<java.lang.String,DBTableInfo>
buildTableInfos(java.lang.String schema, java.util.Collection<java.lang.String> tablesToInit, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
Builds information about database tables.java.util.Map<java.lang.String,DBTableInfo>
buildTableInfosEager(java.lang.String schema, com.im.commons.progress.DFFeedback feedback)
java.util.Map<java.lang.String,DBTableInfo>
buildTableInfosLazy(java.lang.String schema, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
void
checkSchemaExistence(java.lang.String schemaId)
Checks whether an schema exists in the IJC metadata registry (IJC_SCHEMA table) or not also checks whether the database/ IJC_SCHEMA table exists or not.void
executeDDL(java.lang.String[] sql, boolean log)
Executes a list of SQL statement.void
executeDDL(java.lang.String sql, boolean log)
Executes a SQL statement.java.lang.String
getAddAuthoritySql()
java.lang.String
getAddUserRoleSql()
java.lang.String
getAddUserSql()
javax.sql.DataSource
getDataSource()
DBDatabaseInfo
getDBInfo()
java.lang.String
getDefaultSchemaName()
java.lang.String
getDeleteAuthoritiesSql()
java.lang.String
getDeleteUserSql()
java.util.Set<java.lang.String>
getJChemPropertyTableNames()
Returns cached JChem property table names.org.springframework.jdbc.core.JdbcTemplate
getJdbcTemplate()
org.springframework.jdbc.support.lob.LobHandler
getLobHandler()
Deprecated.5.12 UseDBDatabaseInfo.getLobHandler()
instead.java.util.Set<java.lang.String>
getMetaTableNames()
java.util.List<java.lang.String>
getSchemaNames()
Get the list of schema names that are accessible to the user.java.lang.String
getSetEnabledSql()
java.lang.String[]
getTableNames(java.lang.String schema)
Get the table names for the specified schemaorg.springframework.jdbc.datasource.DataSourceTransactionManager
getTransactionManager()
java.lang.String
getUpdatePasswordSql()
java.util.List<java.lang.String>
getUsedSchemas()
Only used on sequences, please do not use this method.java.lang.String[]
getViewNames(java.lang.String schema)
Get the view names for the specified schemajava.lang.Object
readValue(java.sql.ResultSet rs, java.lang.String columnName, java.lang.Class columnClass, int jdbcType)
Deprecated.Use the DBValueHandler which is available from the DBFieldCapability instead.java.lang.String
sqlAddColumn(java.lang.String schemaPlusTable, java.lang.String colName, java.lang.String colClass, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean isNotNull)
java.lang.String
sqlAddForeignKey(java.lang.String fkName, java.lang.String parentSchemaPlusTable, java.lang.String dependentSchemaPlusTable, java.lang.String[] parentCols, java.lang.String[] dependentCols, java.lang.String onDeleteRule, java.lang.String onUpdateRule)
java.lang.String
sqlAddIndex(java.lang.String indexName, java.lang.String indexType, java.lang.String schemaPlusTable, java.lang.String[] columns, boolean[] asc)
Add an index to the tablejava.lang.String
sqlAddUniqueConstraint(java.lang.String consName, java.lang.String schemaPlusTable, java.lang.String[] columns)
Add unique constraint for some columns in the table.java.lang.String
sqlAlterColumnRequired(java.lang.String schemaPlusTable, java.lang.String columnName, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean required)
java.lang.String[]
sqlCreateSecurityTables()
Get the SQL need3ed to create the username/password tables.java.lang.String[]
sqlCreateSecurityTablesExternalConstraints()
Constraints from the security tables to the other tables.java.lang.String
sqlCreateSequence(java.lang.String schemaPlusSequenceName)
java.lang.String
sqlCreateTable(java.lang.String schemaPlusTable, java.util.List<DBDatabaseInfo.NativeType> columnDefs, java.util.List<java.lang.String> columnNames)
Creates a table with the given name and the fields.java.lang.String
sqlDeleteRow(java.lang.String schemaPlusTable, java.lang.String whereClause)
Generate SQL to delete a row.java.lang.String
sqlDropForeignKey(java.lang.String schemaPlusTable, java.lang.String fkName)
java.lang.String
sqlDropIndex(java.lang.String schemaPlusTable, java.lang.String indexName)
java.lang.String
sqlDropPrimaryConstraint(java.lang.String schemaPlusTable, java.lang.String consName, java.lang.String[] columns)
java.lang.String
sqlDropSequence(java.lang.String schemaPlusSequenceName)
java.lang.String
sqlDropTable(java.lang.String schemaPlusTable)
java.lang.String
sqlDropUniqueConstraint(java.lang.String schemaPlusTable, java.lang.String consName, java.lang.String[] columns)
java.lang.String
sqlFullColumnDefinition(java.lang.String colClass, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean isNotNull)
Generate the full column definition, including the defintion of any default value and the NULL/NOT NULL.java.lang.String
sqlInsertRow(SchemaQualifiedName schemaPlusTable, java.util.List columnNames)
Creates insert row sql for a prepared statement of the form INSERT INTO table_name (col_1, col_2...) VALUES (?,?...)java.lang.String
sqlInsertRowDefaults(SchemaQualifiedName schemaPlusTable, java.lang.String[] idColumnNames)
Creates insert row sql that inserts the default value for these columns.java.lang.String
sqlNow()
get the appropriate SQL clause for the curent time.java.lang.String
sqlRebuildIndex(java.lang.String schemaPlusTable, java.lang.String indexName)
java.lang.String
sqlSelectDuplicateRows(java.lang.String schemaPlusTable, java.lang.String[] columns)
java.lang.String[]
sqlUpdateIJCViewsTable()
java.lang.String
sqlUpdateRow(SchemaQualifiedName schemaPlusTable, java.lang.String updateClause, java.lang.String whereClause)
java.lang.String
sqlUpgradeCommand(java.lang.String version, java.lang.String key)
org.springframework.dao.DataAccessException
translateSQLException(java.lang.String message, java.lang.String sql, java.sql.SQLException ex)
void
updateHeartbeat(java.lang.String userName, java.lang.String schemaId)
Updates when the last time user accessed the database for purpose of changing the data.
-
-
-
Field Detail
-
IJC_SCHEMA_OTHER_TABLE_NAME
static final java.lang.String IJC_SCHEMA_OTHER_TABLE_NAME
Name of table for lists, scripts, queries etc.- See Also:
- Constant Field Values
-
IJC_SCHEMA_OTHER_SHARING_TABLE_NAME
static final java.lang.String IJC_SCHEMA_OTHER_SHARING_TABLE_NAME
Name of table containing info about sharing of custom items (scripts etc.).- See Also:
- Constant Field Values
-
NAME_PRIMARY_KEY_CONSTRAINT
static final java.lang.String NAME_PRIMARY_KEY_CONSTRAINT
Marker for a constraint that enforces the primary key. It is not a real name; the string must be a non-identifier so it does not clash with real constraint names.- See Also:
- Constant Field Values
-
IJC_CONNECT_STRUCTURES_TABLE_NAME
static final java.lang.String IJC_CONNECT_STRUCTURES_TABLE_NAME
Name of table for structure id mapping for Connect- See Also:
- Constant Field Values
-
IJC_CONNECT_ITEMS_TABLE_NAME
static final java.lang.String IJC_CONNECT_ITEMS_TABLE_NAME
Name of table for Connect custom items- See Also:
- Constant Field Values
-
IJC_API_KEYS_TABLE_NAME
static final java.lang.String IJC_API_KEYS_TABLE_NAME
Name of table for API keys- See Also:
- Constant Field Values
-
-
Method Detail
-
getDataSource
javax.sql.DataSource getDataSource()
-
getTransactionManager
org.springframework.jdbc.datasource.DataSourceTransactionManager getTransactionManager()
-
getJdbcTemplate
org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
-
getDBInfo
DBDatabaseInfo getDBInfo()
-
buildJChemPropertyTableNames
java.util.Set<java.lang.String> buildJChemPropertyTableNames()
Build the known JChem property table names. These are cached until this method is called again. When the property tables change this method should be called to refresh the cache.- Returns:
- The names of JChem property tables.
-
getJChemPropertyTableNames
java.util.Set<java.lang.String> getJChemPropertyTableNames()
Returns cached JChem property table names. To get updated values or to update the cache usebuildJChemPropertyTableNames()
.- Returns:
- The cached names of JChem property tables.
- Since:
- 14.10.6
-
getDefaultSchemaName
java.lang.String getDefaultSchemaName()
- Returns:
- The default schema to be used
-
buildTableInfo
DBTableInfo buildTableInfo(java.lang.String schema, java.lang.String table, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
Build the full table info for this table. The table info contains all the information about the table.- Parameters:
schema
- The schema in which the table residestable
- The table name- Returns:
- The database table info The method can return null if the table does not exist.
-
buildTableInfoFull
DBTableInfo buildTableInfoFull(java.lang.String schema, java.lang.String table, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
-
buildTableInfos
java.util.Map<java.lang.String,DBTableInfo> buildTableInfos(java.lang.String schema, java.util.Collection<java.lang.String> tablesToInit, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
Builds information about database tables.- Parameters:
schema
- The database schema name to scan for tables and views.tablesToInit
- The schema qualified names of tables that have to be fully loaded. The rest of the tables in the database schema can be loaded lazily.lazyLoader
- The loader that will perform the lazy loading.feedback
- The progress indicator.- Returns:
- A map of DBTableInfos keyed by the schema qualified table/view name
-
buildTableInfosLazy
java.util.Map<java.lang.String,DBTableInfo> buildTableInfosLazy(java.lang.String schema, LazyLoader lazyLoader, com.im.commons.progress.DFFeedback feedback)
-
buildTableInfosEager
java.util.Map<java.lang.String,DBTableInfo> buildTableInfosEager(java.lang.String schema, com.im.commons.progress.DFFeedback feedback)
-
buildColumnInfosForTable
java.util.List<DBColInfo> buildColumnInfosForTable(java.lang.String dbSchemaName, java.lang.String tableName)
Build the DBColInfos for the table.- Parameters:
dbSchemaName
- The schema nametableName
- The table name- Returns:
- A list of DBColInfos for the table
-
buildColumnInfoForColumn
DBColInfo buildColumnInfoForColumn(java.lang.String dbSchemaName, java.lang.String tableName, java.lang.String columnName)
Build the DBColInfos for the particlaar column.- Parameters:
dbSchemaName
- The schema nametableName
- The table namecolumnName
- The column name to match- Returns:
- The DBColInfo
-
buildIndexInfoForTable
java.util.List<DBIndexInfo> buildIndexInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build index info for the specified table.- Parameters:
schemaName
- The schema nametableName
- The table nameuseCache
- use SQL select caching- Returns:
- The indexes for the specified table
-
buildExportedForeignKeyInfoForTable
java.util.List<DBForeignKeyInfo> buildExportedForeignKeyInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build exported foreign key info.- Parameters:
schemaName
- The schema nametableName
- The table nameuseCache
- use SQL select caching- Returns:
- The exported foreign keys
-
buildImportedForeignKeyInfoForTable
java.util.List<DBForeignKeyInfo> buildImportedForeignKeyInfoForTable(java.lang.String schemaName, java.lang.String tableName, boolean useCache)
Build imported foreign key info.- Parameters:
schemaName
- The schema nametableName
- The table nameuseCache
- use SQL select caching- Returns:
- The imported foreign keys
-
getLobHandler
org.springframework.jdbc.support.lob.LobHandler getLobHandler()
Deprecated.5.12 UseDBDatabaseInfo.getLobHandler()
instead.
-
readValue
@Deprecated java.lang.Object readValue(java.sql.ResultSet rs, java.lang.String columnName, java.lang.Class columnClass, int jdbcType) throws java.sql.SQLException
Deprecated.Use the DBValueHandler which is available from the DBFieldCapability instead.Read the value from the ResultSet. The DatabasePlatform method is used so that custom methods of reading the values (e.g from Blob or Clob columns) can be implemented for a particular database type- Throws:
java.sql.SQLException
-
sqlFullColumnDefinition
java.lang.String sqlFullColumnDefinition(java.lang.String colClass, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean isNotNull)
Generate the full column definition, including the defintion of any default value and the NULL/NOT NULL. e.g. VARCHAR(100) DEFAULT 'foo' NOT NULL- Parameters:
colClass
-nativeType
-columnDefinition
-defaultValue
-isNotNull
-- Returns:
- The column definition
-
buildSequenceInfo
java.util.List<DBSequenceInfo> buildSequenceInfo(java.lang.String schema)
- Parameters:
schema
- schema for which the sequence infos should be built- Returns:
- All the sequences from schema
-
buildSequenceInfo
DBSequenceInfo buildSequenceInfo(java.lang.String schema, java.lang.String seqName)
- Parameters:
schema
- schema to look intoseqName
- sequence name- Returns:
- The sequence with the specified name
-
sqlCreateSequence
java.lang.String sqlCreateSequence(java.lang.String schemaPlusSequenceName)
-
sqlDropSequence
java.lang.String sqlDropSequence(java.lang.String schemaPlusSequenceName)
-
sqlAddColumn
java.lang.String sqlAddColumn(java.lang.String schemaPlusTable, java.lang.String colName, java.lang.String colClass, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean isNotNull)
-
sqlUpgradeCommand
java.lang.String sqlUpgradeCommand(java.lang.String version, java.lang.String key)
-
sqlSelectDuplicateRows
java.lang.String sqlSelectDuplicateRows(java.lang.String schemaPlusTable, java.lang.String[] columns)
-
sqlDeleteRow
java.lang.String sqlDeleteRow(java.lang.String schemaPlusTable, java.lang.String whereClause)
Generate SQL to delete a row. The ? placeholder will be used for the ID(s) of the row to delete- Parameters:
schemaPlusTable
- The schema and name of the table to delete fromwhereClause
- The "WHERE" part of the SQL delete command.- Returns:
- SQL in the from of DELETE FROM <table> WHERE <col> = ? [AND <filter>]
-
sqlInsertRow
java.lang.String sqlInsertRow(SchemaQualifiedName schemaPlusTable, java.util.List columnNames)
Creates insert row sql for a prepared statement of the form INSERT INTO table_name (col_1, col_2...) VALUES (?,?...)- Parameters:
schemaPlusTable
- The schema and name of the tablecolumnNames
- The names of the columns with data- Returns:
- The SQL
-
sqlAlterColumnRequired
java.lang.String sqlAlterColumnRequired(java.lang.String schemaPlusTable, java.lang.String columnName, java.lang.String nativeType, java.lang.String columnDefinition, java.lang.String defaultValue, boolean required)
-
sqlNow
java.lang.String sqlNow()
get the appropriate SQL clause for the curent time. e.g NOW(), CURRENT_TIMESTAMP() etc.- Returns:
- The SQL fragment for the current time
-
getSchemaNames
java.util.List<java.lang.String> getSchemaNames()
Get the list of schema names that are accessible to the user. If DB does not support schemas then an empty list is returned.- Returns:
- The names of the schemas
-
getUsedSchemas
java.util.List<java.lang.String> getUsedSchemas()
Only used on sequences, please do not use this method.- Returns:
- used schema by IJC schema
-
getTableNames
java.lang.String[] getTableNames(java.lang.String schema)
Get the table names for the specified schema- Parameters:
schema
- The schema to look in. Should be null if the database does not support schemas- Returns:
- The tables in this schema.
-
sqlDropTable
java.lang.String sqlDropTable(java.lang.String schemaPlusTable)
-
executeDDL
void executeDDL(java.lang.String[] sql, boolean log)
Executes a list of SQL statement.- Parameters:
sql
- The SQL statements to execute.log
- Ignored, SQL logging is done automatically by Log4Jdbc4 connection wrapper.
-
executeDDL
void executeDDL(java.lang.String sql, boolean log)
Executes a SQL statement.- Parameters:
sql
- The SQL statement to execute.log
- Ignored, SQL logging is done automatically by Log4Jdbc4 connection wrapper.
-
sqlCreateSecurityTables
java.lang.String[] sqlCreateSecurityTables()
Get the SQL need3ed to create the username/password tables.- Returns:
- An array of SQL statements needed to create all the tables, indexes, foreign keys...
-
sqlCreateSecurityTablesExternalConstraints
java.lang.String[] sqlCreateSecurityTablesExternalConstraints()
Constraints from the security tables to the other tables. Can only be added if the other tables are present
-
getAddUserSql
java.lang.String getAddUserSql()
-
getAddAuthoritySql
java.lang.String getAddAuthoritySql()
-
getAddUserRoleSql
java.lang.String getAddUserRoleSql()
-
getUpdatePasswordSql
java.lang.String getUpdatePasswordSql()
-
getSetEnabledSql
java.lang.String getSetEnabledSql()
-
getDeleteUserSql
java.lang.String getDeleteUserSql()
-
getDeleteAuthoritiesSql
java.lang.String getDeleteAuthoritiesSql()
-
sqlInsertRowDefaults
java.lang.String sqlInsertRowDefaults(SchemaQualifiedName schemaPlusTable, java.lang.String[] idColumnNames)
Creates insert row sql that inserts the default value for these columns. Useful when inserting empty rows when at least one column (the PK column) has to be specified.- Parameters:
schemaPlusTable
- The name of the tableidColumnNames
- The names of the columns to insert the default- Returns:
- The SQL
-
sqlUpdateRow
java.lang.String sqlUpdateRow(SchemaQualifiedName schemaPlusTable, java.lang.String updateClause, java.lang.String whereClause)
- Parameters:
schemaPlusTable
- The name of the table to updateupdateClause
- The values to update e.g. col1 = 'hello world', col2 = 77whereClause
- The where clause to defined the row(s) e.g. id = 999- Returns:
- The SQL
-
sqlAddUniqueConstraint
java.lang.String sqlAddUniqueConstraint(java.lang.String consName, java.lang.String schemaPlusTable, java.lang.String[] columns)
Add unique constraint for some columns in the table. Usually that will imply creation of an unique-valued index in the database.- Parameters:
consName
- The c onstraint nameschemaPlusTable
- The t able namecolumns
- The c olumns which will form the unique key. Order is important.- Returns:
- SQL statement to create the unique key
-
sqlDropPrimaryConstraint
java.lang.String sqlDropPrimaryConstraint(java.lang.String schemaPlusTable, java.lang.String consName, java.lang.String[] columns)
-
sqlDropUniqueConstraint
java.lang.String sqlDropUniqueConstraint(java.lang.String schemaPlusTable, java.lang.String consName, java.lang.String[] columns)
-
getMetaTableNames
java.util.Set<java.lang.String> getMetaTableNames()
- Returns:
- The names of tables, that hold the schema metadata information
-
sqlAddForeignKey
java.lang.String sqlAddForeignKey(java.lang.String fkName, java.lang.String parentSchemaPlusTable, java.lang.String dependentSchemaPlusTable, java.lang.String[] parentCols, java.lang.String[] dependentCols, java.lang.String onDeleteRule, java.lang.String onUpdateRule)
-
sqlCreateTable
java.lang.String sqlCreateTable(java.lang.String schemaPlusTable, java.util.List<DBDatabaseInfo.NativeType> columnDefs, java.util.List<java.lang.String> columnNames)
Creates a table with the given name and the fields. The list of columnDefs cannot be empty or null; the table must contain at least one column. The list of column names must be the same size as column definitions; name at index "i" will be used for column defined by definition at index "i".- Parameters:
schemaPlusTable
- identifier of the tablecolumnDefs
- The column definitionscolumnNames
- The column names- Returns:
- SQL statement to create the table
-
buildConstraintInfosForTable
java.util.List<DBConstraintInfo> buildConstraintInfosForTable(java.lang.String dbSchemaName, java.lang.String tableName, java.util.List<DBColInfo> cols, boolean useCache)
Retrieves unique constraints declared for the table. Returns empty list if no unique constraint exists. Also reports PRIMARY keys as unique constraints.- Parameters:
dbSchemaName
- The schema nametableName
- The table namecols
- The columns in the table to look inuseCache
- use SQL select caching- Returns:
- List of constraints.
-
sqlDropForeignKey
java.lang.String sqlDropForeignKey(java.lang.String schemaPlusTable, java.lang.String fkName)
-
getViewNames
java.lang.String[] getViewNames(java.lang.String schema)
Get the view names for the specified schema- Parameters:
schema
- The schema to look in. Should be null if the database does not support schemas- Returns:
- The views in this schema.
-
translateSQLException
org.springframework.dao.DataAccessException translateSQLException(java.lang.String message, java.lang.String sql, java.sql.SQLException ex)
-
sqlRebuildIndex
java.lang.String sqlRebuildIndex(java.lang.String schemaPlusTable, java.lang.String indexName)
-
sqlDropIndex
java.lang.String sqlDropIndex(java.lang.String schemaPlusTable, java.lang.String indexName)
-
sqlAddIndex
java.lang.String sqlAddIndex(java.lang.String indexName, java.lang.String indexType, java.lang.String schemaPlusTable, java.lang.String[] columns, boolean[] asc)
Add an index to the table- Parameters:
indexName
- The name for the index.indexType
- The type of index. e.g. UNIQUE. Consult the supportedIndexTypes() method to find out which types your DB supports. Can be null for a regular index.schemaPlusTable
- The table for the indexcolumns
- The columnsasc
- Is the index for this column ascending or descending. true means ASC, false means DESC. Can be null, but if specified must have the same size as the columns Must be the same number of values as there are columns.- Returns:
- The SQL for adding the index
-
sqlUpdateIJCViewsTable
java.lang.String[] sqlUpdateIJCViewsTable()
- Returns:
- SQL statements to upgrade the IJC_Views table
-
checkSchemaExistence
void checkSchemaExistence(java.lang.String schemaId) throws SchemaDoesNotExistException
Checks whether an schema exists in the IJC metadata registry (IJC_SCHEMA table) or not also checks whether the database/ IJC_SCHEMA table exists or not.- Parameters:
schemaId
-- Throws:
SchemaDoesNotExistException
-
updateHeartbeat
void updateHeartbeat(java.lang.String userName, java.lang.String schemaId)
Updates when the last time user accessed the database for purpose of changing the data.- Parameters:
userName
- current logged in userschemaId
- current schema
-
-