public abstract class BaseDatabaseMeta extends Object implements Cloneable, DatabaseInterface
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_CLUSTER_DBNAME_PREFIX
The clustering database name prefix
|
static String |
ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX
The clustering hostname prefix
|
static String |
ATTRIBUTE_CLUSTER_PASSWORD_PREFIX
The clustering database password prefix
|
static String |
ATTRIBUTE_CLUSTER_PORT_PREFIX
The clustering port prefix
|
static String |
ATTRIBUTE_CLUSTER_USERNAME_PREFIX
The clustering database username prefix
|
static String |
ATTRIBUTE_FORCE_IDENTIFIERS_TO_LOWERCASE
A flag to determine if we should force all identifiers to lower case
|
static String |
ATTRIBUTE_FORCE_IDENTIFIERS_TO_UPPERCASE
A flag to determine if we should force all identifiers to UPPER CASE
|
static String |
ATTRIBUTE_INITIAL_POOL_SIZE
If we use connection pooling, this would contain the initial pool size
|
static String |
ATTRIBUTE_IS_CLUSTERED
A flag to determine if the connection is clustered or not.
|
static String |
ATTRIBUTE_MAXIMUM_POOL_SIZE
If we use connection pooling, this would contain the maximum pool size
|
static String |
ATTRIBUTE_MSSQL_DOUBLE_DECIMAL_SEPARATOR
A flag to determine if we should use a double decimal separator to specify schema/table combinations on MS-SQL
server
|
static String |
ATTRIBUTE_POOLING_PARAMETER_PREFIX
The pooling parameters
|
static String |
ATTRIBUTE_PORT_NUMBER
The port number of the database as string: allows for parameterization.
|
static String |
ATTRIBUTE_PREFERRED_SCHEMA_NAME
The preferred schema to use if no other has been specified.
|
static String |
ATTRIBUTE_PREFIX_EXTRA_OPTION
The prefix for all the extra options attributes
|
static String |
ATTRIBUTE_PRESERVE_RESERVED_WORD_CASE
Checkbox to allow you to configure if the reserved words will have their case changed during the handleCase call
|
static String |
ATTRIBUTE_QUOTE_ALL_FIELDS
A flag to determine if we should quote all fields
|
static String |
ATTRIBUTE_SQL_CONNECT
The SQL to execute at connect time (right after connecting)
|
static String |
ATTRIBUTE_SUPPORTS_BOOLEAN_DATA_TYPE
Checkbox to allow you to configure if the database supports the boolean data type or not.
|
static String |
ATTRIBUTE_SUPPORTS_TIMESTAMP_DATA_TYPE
Checkbox to allow you to configure if the database supports the Timestamp data type or not.
|
static String |
ATTRIBUTE_USE_POOLING
A flag to determine if we should use connection pooling or not.
|
static String |
ATTRIBUTE_USE_RESULT_STREAMING
A flag to determine if we should use result streaming on MySQL
|
static String |
AUTOINCREMENT_SQL_FOR_BATCH_ID |
static DatabaseConnectionPoolParameter[] |
poolingParameters |
static String |
SELECT_COUNT_STATEMENT
The SQL, minus the table name, to select the number of rows from a table
|
static String |
SEQUENCE_FOR_BATCH_ID |
| Constructor and Description |
|---|
BaseDatabaseMeta() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtraOption(String databaseTypeCode,
String option,
String value)
Add an extra option to the attributes list
|
boolean |
checkIndexExists(Database database,
String schemaName,
String tableName,
String[] idx_fields)
Verifies on the specified database connection if an index exists on the fields with the specified name.
|
Object |
clone()
Clone the basic settings for this connection!
|
ValueMetaInterface |
customizeValueFromSQLType(ValueMetaInterface v,
ResultSetMetaData rm,
int index)
Customizes the ValueMetaInterface defined in the base
|
String |
generateColumnAlias(int columnIndex,
String suggestedName)
Generate a column alias given the column index and suggested name.
|
int |
getAccessType() |
abstract int[] |
getAccessTypeList()
Get the list of possible access types for a database.
|
Properties |
getAttributes() |
String |
getBackwardsCompatibleSchemaTableCombination(String schemaPart,
String tablePart)
Deprecated.
we should phase this out in 5.0, but it's there to keep backwards compatibility in the 4.x releases.
|
String |
getBackwardsCompatibleTable(String tablePart)
Deprecated.
we should phase this out in 5.0, but it's there to keep backwards compatibility in the 4.x releases.
|
Properties |
getConnectionPoolingProperties() |
String |
getConnectSQL() |
String |
getCreateTableStatement()
Customizes the ValueMetaInterface defined in the base
|
String |
getDatabaseFactoryName()
You can use this method to supply an alternate factory for the test method in the dialogs.
|
String |
getDatabaseName() |
String |
getDatabasePortNumberString() |
String |
getDataTablespace() |
String |
getDataTablespaceDDL(VariableSpace variables,
DatabaseMeta databaseMeta)
Returns the tablespace DDL fragment for a "Data" tablespace.
|
int |
getDefaultDatabasePort() |
Map<String,String> |
getDefaultOptions() |
String |
getDisplayName() |
String |
getDropColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean use_autoinc,
String pk,
boolean semicolon)
Generates the SQL statement to drop a column from the specified table
|
String |
getEndQuote() |
String |
getExtraOptionIndicator() |
Map<String,String> |
getExtraOptions() |
String |
getExtraOptionSeparator() |
String |
getExtraOptionsHelpText() |
String |
getExtraOptionValueSeparator() |
String |
getFunctionAverage() |
String |
getFunctionCount() |
String |
getFunctionMaximum() |
String |
getFunctionMinimum() |
String |
getFunctionSum() |
String |
getHostname() |
String |
getIndexTablespace() |
String |
getIndexTablespaceDDL(VariableSpace variables,
DatabaseMeta databaseMeta)
Returns the tablespace DDL fragment for a "Index" tablespace.
|
int |
getInitialPoolSize() |
String |
getLimitClause(int nrRows) |
int |
getMaxColumnsInIndex() |
int |
getMaximumPoolSize() |
int |
getMaxTextFieldLength()
Get the maximum length of a text field for this database connection.
|
int |
getMaxVARCHARLength()
Get the maximum length of a text field (VARCHAR) for this database connection.
|
String |
getName() |
Long |
getNextBatchId(DatabaseMeta dbm,
Database ldb,
String schemaName,
String tableName,
String fieldName)
Get the next Batch ID from the logging tables.
|
Long |
getNextBatchIdUsingAutoIncSQL(String autoIncSQL,
DatabaseMeta dbm,
Database ldb) |
Long |
getNextBatchIdUsingLockTables(DatabaseMeta dbm,
Database ldb,
String schemaName,
String tableName,
String fieldName) |
Long |
getNextBatchIdUsingSequence(String sequenceName,
String schemaName,
DatabaseMeta dbm,
Database ldb) |
int |
getNotFoundTK(boolean use_autoinc)
Get the not found technical key.
|
ObjectId |
getObjectId() |
PartitionDatabaseMeta[] |
getPartitioningInformation() |
String |
getPassword() |
String |
getPluginId() |
String |
getPluginName() |
String |
getPreferredSchemaName() |
String[] |
getReservedWords() |
String |
getSafeFieldname(String fieldname)
Sanitize a string for usage as a field name
Append an underscore to any field name that matches a reserved word
Replaces spaces with underscores
Prefixes a string with underscore that begins with a number
|
String |
getSchemaTableCombination(String schema_name,
String table_part)
Get the schema-table combination to query the right table.
|
String |
getSelectCountStatement(String tableName)
Build the SQL to count the number of rows in the passed table.
|
String |
getSequenceNoMaxValueOption() |
String |
getServername() |
String |
getSQLColumnExists(String columnname,
String tablename) |
String |
getSQLCurrentSequenceValue(String sequenceName)
Get the current value of a database sequence
|
String |
getSQLInsertAutoIncUnknownDimensionRow(String schemaTable,
String keyField,
String versionField)
Get the SQL to insert a new empty unknown record in a dimension.
|
String |
getSQLListOfProcedures() |
String |
getSQLListOfSchemas() |
String |
getSQLListOfSequences() |
String |
getSQLLockTables(String[] tableNames) |
String |
getSQLNextSequenceValue(String sequenceName)
Get the SQL to get the next value of a sequence.
|
String |
getSQLQueryFields(String tableName)
Returns the minimal SQL to launch in order to determine the layout of the resultset for a given database table
|
List<SqlScriptStatement> |
getSqlScriptStatements(String sqlScript)
Parse the statements in the provided SQL script, provide more information about where each was found in the script.
|
String |
getSQLSequenceExists(String sequenceName)
Check if a sequence exists.
|
String |
getSQLTableExists(String tablename) |
String |
getSQLUnlockTables(String[] tableNames) |
String |
getSQLValue(ValueMetaInterface valueMeta,
Object valueData,
String dateFormat)
Convert a value in the SQL equivalent.
|
String |
getStartQuote() |
String[] |
getSynonymTypes() |
String |
getTablespaceDDL(VariableSpace variables,
DatabaseMeta databaseMeta,
String tablespaceName)
Returns an empty string as most databases do not support tablespaces.
|
String[] |
getTableTypes() |
String |
getTruncateTableStatement(String tableName) |
String |
getUsername() |
Object |
getValueFromResultSet(ResultSet rs,
ValueMetaInterface val,
int i)
This method allows a database dialect to convert database specific data types to Kettle data types.
|
String[] |
getViewTypes() |
String |
getXulOverlayFile() |
boolean |
isChanged() |
boolean |
isDefaultingToUppercase() |
boolean |
isDisplaySizeTwiceThePrecision() |
boolean |
isExplorable() |
boolean |
isFetchSizeSupported()
Checks whether or not the command setFetchSize() is supported by the JDBC driver...
|
boolean |
isForcingIdentifiersToLowerCase() |
boolean |
isForcingIdentifiersToUpperCase() |
boolean |
isMySQLVariant() |
boolean |
isPartitioned() |
boolean |
isQuoteAllFields() |
boolean |
isRequiringTransactionsOnQueries() |
boolean |
isStreamingResults() |
boolean |
isSystemTable(String tableName) |
boolean |
isUsingConnectionPool() |
boolean |
isUsingDoubleDecimalAsSchemaTableSeparator() |
boolean |
needsPlaceHolder()
Indicates the need to insert a placeholder (0) for auto increment fields.
|
boolean |
needsToLockAllTables() |
List<String> |
parseStatements(String sqlScript)
Parse all possible statements from the provided SQL script.
|
boolean |
preserveReservedCase() |
boolean |
quoteReservedWords() |
String |
quoteSQLString(String string)
Adds quotes around the string according to the database dialect and also escapes special characters like CR, LF and
the quote character itself.
|
boolean |
releaseSavepoint()
Returns a true of savepoints can be released, false if not.
|
boolean |
requiresCastToVariousForIsNull() |
boolean |
requiresCreateTablePrimaryKeyAppend() |
void |
setAccessType(int accessType) |
void |
setAttributes(Properties attributes)
Set extra attributes on this database connection
|
void |
setChanged(boolean changed) |
void |
setConnectionPoolingProperties(Properties properties)
set the connection pooling properties
|
void |
setConnectSQL(String sql) |
void |
setDatabaseName(String databaseName) |
void |
setDatabasePortNumberString(String databasePortNumberString) |
void |
setDataTablespace(String dataTablespace) |
void |
setDisplayName(String displayName) |
void |
setForcingIdentifiersToLowerCase(boolean forceLowerCase) |
void |
setForcingIdentifiersToUpperCase(boolean forceUpperCase) |
void |
setHostname(String hostname) |
void |
setIndexTablespace(String indexTablespace) |
void |
setInitialPoolSize(int initialPoolSize) |
void |
setMaximumPoolSize(int maximumPoolSize) |
void |
setName(String name) |
void |
setObjectId(ObjectId id) |
void |
setPartitioned(boolean clustered) |
void |
setPartitioningInformation(PartitionDatabaseMeta[] clusterInfo) |
void |
setPassword(String password) |
void |
setPluginId(String pluginId) |
void |
setPluginName(String pluginName) |
void |
setPreferredSchemaName(String preferredSchemaName) |
void |
setPreserveReservedCase(boolean b) |
void |
setQuoteAllFields(boolean quoteAllFields) |
void |
setServername(String servername) |
void |
setStreamingResults(boolean useStreaming) |
void |
setSupportsBooleanDataType(boolean b) |
void |
setSupportsTimestampDataType(boolean b) |
void |
setUsername(String username) |
void |
setUsingConnectionPool(boolean usePool) |
void |
setUsingDoubleDecimalAsSchemaTableSeparator(boolean useDoubleDecimalSeparator) |
boolean |
supportsAutoGeneratedKeys() |
boolean |
supportsAutoInc() |
boolean |
supportsBatchUpdates() |
boolean |
supportsBitmapIndex() |
boolean |
supportsBooleanDataType() |
boolean |
supportsCatalogs() |
boolean |
supportsEmptyTransactions() |
boolean |
supportsErrorHandling() |
boolean |
supportsErrorHandlingOnBatchUpdates() |
boolean |
supportsFloatRoundingOnUpdate()
Most databases round number(7,2) 17.29999999 to 17.30, but some don't.
|
boolean |
supportsGetBlob() |
boolean |
supportsNewLinesInSQL() |
boolean |
supportsOptionsInURL() |
boolean |
supportsPreparedStatementMetadataRetrieval()
Most databases allow you to retrieve result metadata by preparing a SELECT statement.
|
boolean |
supportsRepository() |
boolean |
supportsResultSetMetadataRetrievalOnly() |
boolean |
supportsSchemas() |
boolean |
supportsSequenceNoMaxValueOption() |
boolean |
supportsSequences() |
boolean |
supportsSetCharacterStream()
See if this database supports the setCharacterStream() method on a PreparedStatement.
|
boolean |
supportsSetLong() |
boolean |
supportsSetMaxRows() |
boolean |
supportsSynonyms() |
boolean |
supportsTimestampDataType() |
boolean |
supportsTimeStampToDateConversion() |
boolean |
supportsTransactions() |
boolean |
supportsViews() |
boolean |
useSafePoints() |
boolean |
useSchemaNameForTableList() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAddColumnStatement, getDriverClass, getFieldDefinition, getModifyColumnStatement, getURL, getUsedLibrariespublic static final String ATTRIBUTE_PORT_NUMBER
public static final String ATTRIBUTE_SQL_CONNECT
public static final String ATTRIBUTE_USE_POOLING
public static final String ATTRIBUTE_MAXIMUM_POOL_SIZE
public static final String ATTRIBUTE_INITIAL_POOL_SIZE
public static final String ATTRIBUTE_PREFIX_EXTRA_OPTION
public static final String ATTRIBUTE_IS_CLUSTERED
public static final String ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX
public static final String ATTRIBUTE_CLUSTER_PORT_PREFIX
public static final String ATTRIBUTE_CLUSTER_DBNAME_PREFIX
public static final String ATTRIBUTE_CLUSTER_USERNAME_PREFIX
public static final String ATTRIBUTE_CLUSTER_PASSWORD_PREFIX
public static final String ATTRIBUTE_POOLING_PARAMETER_PREFIX
public static final String ATTRIBUTE_USE_RESULT_STREAMING
public static final String ATTRIBUTE_MSSQL_DOUBLE_DECIMAL_SEPARATOR
public static final String ATTRIBUTE_QUOTE_ALL_FIELDS
public static final String ATTRIBUTE_FORCE_IDENTIFIERS_TO_LOWERCASE
public static final String ATTRIBUTE_FORCE_IDENTIFIERS_TO_UPPERCASE
public static final String ATTRIBUTE_PREFERRED_SCHEMA_NAME
public static final String ATTRIBUTE_SUPPORTS_BOOLEAN_DATA_TYPE
public static final String ATTRIBUTE_SUPPORTS_TIMESTAMP_DATA_TYPE
public static final String ATTRIBUTE_PRESERVE_RESERVED_WORD_CASE
public static final String SEQUENCE_FOR_BATCH_ID
public static final String AUTOINCREMENT_SQL_FOR_BATCH_ID
public static final String SELECT_COUNT_STATEMENT
public static final DatabaseConnectionPoolParameter[] poolingParameters
public String getPluginId()
getPluginId in interface DatabaseInterfacepublic void setPluginId(String pluginId)
setPluginId in interface DatabaseInterfacepluginId - The plugin ID to set.public String getPluginName()
getPluginName in interface DatabaseInterfacepublic void setPluginName(String pluginName)
setPluginName in interface DatabaseInterfacepluginName - The plugin name to set.public abstract int[] getAccessTypeList()
DatabaseInterfacegetAccessTypeList in interface DatabaseInterfacepublic int getAccessType()
getAccessType in interface DatabaseInterfacepublic void setAccessType(int accessType)
setAccessType in interface DatabaseInterfaceaccessType - The accessType to set.public boolean isChanged()
isChanged in interface DatabaseInterfacepublic void setChanged(boolean changed)
setChanged in interface DatabaseInterfacechanged - The changed to set.public String getName()
getName in interface DatabaseInterfacepublic void setName(String name)
setName in interface DatabaseInterfacename - The connection Name to set.public String getDisplayName()
getDisplayName in interface DatabaseInterfacepublic void setDisplayName(String displayName)
setDisplayName in interface DatabaseInterfacedisplayName - The un-escaped connection Name to set.public String getDatabaseName()
getDatabaseName in interface DatabaseInterfacepublic void setDatabaseName(String databaseName)
setDatabaseName in interface DatabaseInterfacedatabaseName - The databaseName to set.public void setDatabasePortNumberString(String databasePortNumberString)
setDatabasePortNumberString in interface DatabaseInterfacedatabasePortNumberString - The databasePortNumber string to set.public String getDatabasePortNumberString()
getDatabasePortNumberString in interface DatabaseInterfacepublic String getHostname()
getHostname in interface DatabaseInterfacepublic void setHostname(String hostname)
setHostname in interface DatabaseInterfacehostname - The hostname to set.public ObjectId getObjectId()
getObjectId in interface DatabaseInterfacepublic void setObjectId(ObjectId id)
setObjectId in interface DatabaseInterfaceid - The id to set.public String getPassword()
getPassword in interface DatabaseInterfacepublic void setPassword(String password)
setPassword in interface DatabaseInterfacepassword - The password to set.public String getServername()
getServername in interface DatabaseInterfacepublic void setServername(String servername)
setServername in interface DatabaseInterfaceservername - The servername to set.public String getDataTablespace()
getDataTablespace in interface DatabaseInterfacepublic void setDataTablespace(String dataTablespace)
setDataTablespace in interface DatabaseInterfacedataTablespace - The data tablespace to set.public String getIndexTablespace()
getIndexTablespace in interface DatabaseInterfacepublic void setIndexTablespace(String indexTablespace)
setIndexTablespace in interface DatabaseInterfaceindexTablespace - The index tablespace to set.public String getUsername()
getUsername in interface DatabaseInterfacepublic void setUsername(String username)
setUsername in interface DatabaseInterfaceusername - The username to set.public Properties getAttributes()
getAttributes in interface DatabaseInterfacepublic void setAttributes(Properties attributes)
setAttributes in interface DatabaseInterfaceattributes - The extra attributes to set on this database connection.public Object clone()
clone in interface DatabaseInterfaceclone in class Objectpublic int getDefaultDatabasePort()
getDefaultDatabasePort in interface DatabaseInterfacepublic Map<String,String> getDefaultOptions()
getDefaultOptions in interface DatabaseInterfacepublic boolean supportsSetCharacterStream()
supportsSetCharacterStream in interface DatabaseInterfacepublic boolean supportsAutoInc()
supportsAutoInc in interface DatabaseInterfacepublic String getLimitClause(int nrRows)
getLimitClause in interface DatabaseInterfacenrRows - The number of rows to which we want to limit the result of the query.public int getNotFoundTK(boolean use_autoinc)
DatabaseInterfacegetNotFoundTK in interface DatabaseInterfaceuse_autoinc - Whether or not we want to use an auto increment fieldpublic String getSQLNextSequenceValue(String sequenceName)
getSQLNextSequenceValue in interface DatabaseInterfacesequenceName - The sequence namepublic String getSQLCurrentSequenceValue(String sequenceName)
getSQLCurrentSequenceValue in interface DatabaseInterfacesequenceName - The sequence to checkpublic String getSQLSequenceExists(String sequenceName)
getSQLSequenceExists in interface DatabaseInterfacesequenceName - The sequence to checkpublic boolean isFetchSizeSupported()
isFetchSizeSupported in interface DatabaseInterfacepublic boolean needsPlaceHolder()
needsPlaceHolder in interface DatabaseInterfacepublic boolean supportsSchemas()
supportsSchemas in interface DatabaseInterfacepublic boolean supportsCatalogs()
supportsCatalogs in interface DatabaseInterfacepublic boolean supportsEmptyTransactions()
supportsEmptyTransactions in interface DatabaseInterfacepublic String getFunctionSum()
getFunctionSum in interface DatabaseInterfacepublic String getFunctionAverage()
getFunctionAverage in interface DatabaseInterfacepublic String getFunctionMinimum()
getFunctionMinimum in interface DatabaseInterfacepublic String getFunctionMaximum()
getFunctionMaximum in interface DatabaseInterfacepublic String getFunctionCount()
getFunctionCount in interface DatabaseInterfacepublic String getSchemaTableCombination(String schema_name, String table_part)
getSchemaTableCombination in interface DatabaseInterfaceschema_name - The schema nametable_part - The tablename@Deprecated public String getBackwardsCompatibleSchemaTableCombination(String schemaPart, String tablePart)
schemaPart - tablePart - @Deprecated public String getBackwardsCompatibleTable(String tablePart)
tablePart - public int getMaxTextFieldLength()
getMaxTextFieldLength in interface DatabaseInterfacepublic int getMaxVARCHARLength()
getMaxVARCHARLength in interface DatabaseInterfacepublic boolean supportsTransactions()
supportsTransactions in interface DatabaseInterfacepublic boolean supportsSequences()
supportsSequences in interface DatabaseInterfacepublic boolean supportsBitmapIndex()
supportsBitmapIndex in interface DatabaseInterfacepublic boolean supportsSetLong()
supportsSetLong in interface DatabaseInterfacepublic String getDropColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
getDropColumnStatement in interface DatabaseInterfacetablename - The table to addv - The column defined as a valuetk - the name of the technical key fielduse_autoinc - whether or not this field uses auto incrementpk - the name of the primary key fieldsemicolon - whether or not to add a semi-colon behind the statement.public String[] getReservedWords()
getReservedWords in interface DatabaseInterfacepublic boolean quoteReservedWords()
quoteReservedWords in interface DatabaseInterfacepublic String getStartQuote()
getStartQuote in interface DatabaseInterfacepublic String getEndQuote()
getEndQuote in interface DatabaseInterfacepublic boolean supportsRepository()
supportsRepository in interface DatabaseInterfacepublic String[] getTableTypes()
getTableTypes in interface DatabaseInterfacepublic String[] getViewTypes()
getViewTypes in interface DatabaseInterfacepublic String[] getSynonymTypes()
getSynonymTypes in interface DatabaseInterfacepublic boolean useSchemaNameForTableList()
useSchemaNameForTableList in interface DatabaseInterfacepublic boolean supportsViews()
supportsViews in interface DatabaseInterfacepublic boolean supportsSynonyms()
supportsSynonyms in interface DatabaseInterfacepublic String getSQLListOfProcedures()
getSQLListOfProcedures in interface DatabaseInterfacepublic String getSQLListOfSequences()
getSQLListOfSequences in interface DatabaseInterfacepublic String getTruncateTableStatement(String tableName)
getTruncateTableStatement in interface DatabaseInterfacetableName - The table to be truncated.public String getSQLQueryFields(String tableName)
getSQLQueryFields in interface DatabaseInterfacetableName - The name of the table to determine the layout forpublic boolean supportsFloatRoundingOnUpdate()
supportsFloatRoundingOnUpdate in interface DatabaseInterfacepublic String getSQLLockTables(String[] tableNames)
getSQLLockTables in interface DatabaseInterfacetableNames - The names of the tables to lockpublic String getSQLUnlockTables(String[] tableNames)
getSQLUnlockTables in interface DatabaseInterfacetableNames - The names of the tables to unlockpublic boolean supportsTimeStampToDateConversion()
supportsTimeStampToDateConversion in interface DatabaseInterfacepublic boolean supportsBatchUpdates()
supportsBatchUpdates in interface DatabaseInterfacepublic boolean supportsBooleanDataType()
supportsBooleanDataType in interface DatabaseInterfacepublic void setSupportsBooleanDataType(boolean b)
setSupportsBooleanDataType in interface DatabaseInterfaceb - Set to true if the database supports a boolean, bit, logical, ... datatypepublic boolean supportsTimestampDataType()
supportsTimestampDataType in interface DatabaseInterfacepublic void setSupportsTimestampDataType(boolean b)
setSupportsTimestampDataType in interface DatabaseInterfaceb - Set to true if the database supports the Timestamp data type (nanosecond precision and all)public boolean preserveReservedCase()
preserveReservedCase in interface DatabaseInterfacepublic void setPreserveReservedCase(boolean b)
setPreserveReservedCase in interface DatabaseInterfaceb - Set to true if reserved words' case should be preservedpublic boolean isDefaultingToUppercase()
isDefaultingToUppercase in interface DatabaseInterfacepublic Map<String,String> getExtraOptions()
getExtraOptions in interface DatabaseInterfacepublic void addExtraOption(String databaseTypeCode, String option, String value)
addExtraOption in interface DatabaseInterfacedatabaseTypeCode - The database type code for which the option appliesoption - The option to setvalue - The value of the optionpublic String getExtraOptionSeparator()
getExtraOptionSeparator in interface DatabaseInterfacepublic String getExtraOptionValueSeparator()
getExtraOptionValueSeparator in interface DatabaseInterfacepublic String getExtraOptionIndicator()
getExtraOptionIndicator in interface DatabaseInterfacepublic boolean supportsOptionsInURL()
supportsOptionsInURL in interface DatabaseInterfacepublic String getExtraOptionsHelpText()
getExtraOptionsHelpText in interface DatabaseInterfacepublic boolean supportsGetBlob()
supportsGetBlob in interface DatabaseInterfacepublic String getConnectSQL()
getConnectSQL in interface DatabaseInterfacepublic void setConnectSQL(String sql)
setConnectSQL in interface DatabaseInterfacesql - The SQL to execute right after connectingpublic boolean supportsSetMaxRows()
supportsSetMaxRows in interface DatabaseInterfacepublic boolean isUsingConnectionPool()
isUsingConnectionPool in interface DatabaseInterfacepublic void setUsingConnectionPool(boolean usePool)
setUsingConnectionPool in interface DatabaseInterfaceusePool - true if we want to use a database connection poolpublic int getMaximumPoolSize()
getMaximumPoolSize in interface DatabaseInterfacepublic void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize in interface DatabaseInterfacemaximumPoolSize - the maximum pool sizepublic int getInitialPoolSize()
getInitialPoolSize in interface DatabaseInterfacepublic void setInitialPoolSize(int initialPoolSize)
setInitialPoolSize in interface DatabaseInterfaceinitialPoolSize - the initial pool sizepublic boolean isPartitioned()
isPartitioned in interface DatabaseInterfacepublic void setPartitioned(boolean clustered)
setPartitioned in interface DatabaseInterfaceclustered - true if we want to use a database connection poolpublic PartitionDatabaseMeta[] getPartitioningInformation()
getPartitioningInformation in interface DatabaseInterfacepublic void setPartitioningInformation(PartitionDatabaseMeta[] clusterInfo)
setPartitioningInformation in interface DatabaseInterfaceclusterInfo - the available partition/host/databases/port combinations in the clusterpublic Properties getConnectionPoolingProperties()
getConnectionPoolingProperties in interface DatabaseInterfacepublic void setConnectionPoolingProperties(Properties properties)
DatabaseInterfacesetConnectionPoolingProperties in interface DatabaseInterfacepublic String getSQLTableExists(String tablename)
getSQLTableExists in interface DatabaseInterfacetablename - The table to verify the existance forpublic String getSQLColumnExists(String columnname, String tablename)
getSQLColumnExists in interface DatabaseInterfacecolumnname - The column to verify the existance fortablename - The table to verify the existance forpublic boolean needsToLockAllTables()
needsToLockAllTables in interface DatabaseInterfacepublic boolean isStreamingResults()
isStreamingResults in interface DatabaseInterfacepublic void setStreamingResults(boolean useStreaming)
setStreamingResults in interface DatabaseInterfaceuseStreaming - true if we want the database to stream results (normally this is an option just for MySQL).public boolean isQuoteAllFields()
isQuoteAllFields in interface DatabaseInterfacepublic void setQuoteAllFields(boolean quoteAllFields)
setQuoteAllFields in interface DatabaseInterfacequoteAllFields - true if we want the database to stream results (normally this is an option just for MySQL).public boolean isForcingIdentifiersToLowerCase()
isForcingIdentifiersToLowerCase in interface DatabaseInterfacepublic void setForcingIdentifiersToLowerCase(boolean forceLowerCase)
setForcingIdentifiersToLowerCase in interface DatabaseInterfaceforceLowerCase - true if all identifiers should be forced to lower casepublic boolean isForcingIdentifiersToUpperCase()
isForcingIdentifiersToUpperCase in interface DatabaseInterfacepublic void setForcingIdentifiersToUpperCase(boolean forceUpperCase)
setForcingIdentifiersToUpperCase in interface DatabaseInterfaceforceUpperCase - true if all identifiers should be forced to upper casepublic boolean isUsingDoubleDecimalAsSchemaTableSeparator()
isUsingDoubleDecimalAsSchemaTableSeparator in interface DatabaseInterfacepublic void setUsingDoubleDecimalAsSchemaTableSeparator(boolean useDoubleDecimalSeparator)
setUsingDoubleDecimalAsSchemaTableSeparator in interface DatabaseInterfaceuseDoubleDecimalSeparator - true if we should use a double decimal separator to specify schema/table combinations on MS-SQL serverpublic boolean isRequiringTransactionsOnQueries()
isRequiringTransactionsOnQueries in interface DatabaseInterfacepublic String getDatabaseFactoryName()
getDatabaseFactoryName in interface DatabaseInterfacepublic String getPreferredSchemaName()
getPreferredSchemaName in interface DatabaseInterfacepublic void setPreferredSchemaName(String preferredSchemaName)
setPreferredSchemaName in interface DatabaseInterfacepreferredSchemaName - The preferred schema name of this database connection.public boolean checkIndexExists(Database database, String schemaName, String tableName, String[] idx_fields) throws KettleDatabaseException
checkIndexExists in interface DatabaseInterfacedatabase - a connected databaseschemaName - tableName - idx_fields - KettleDatabaseExceptionpublic boolean supportsSequenceNoMaxValueOption()
supportsSequenceNoMaxValueOption in interface DatabaseInterfacepublic boolean requiresCreateTablePrimaryKeyAppend()
requiresCreateTablePrimaryKeyAppend in interface DatabaseInterfacepublic boolean requiresCastToVariousForIsNull()
requiresCastToVariousForIsNull in interface DatabaseInterfacepublic boolean isDisplaySizeTwiceThePrecision()
isDisplaySizeTwiceThePrecision in interface DatabaseInterfacepublic boolean supportsPreparedStatementMetadataRetrieval()
supportsPreparedStatementMetadataRetrieval in interface DatabaseInterfacepublic boolean supportsResultSetMetadataRetrievalOnly()
supportsResultSetMetadataRetrievalOnly in interface DatabaseInterfacepublic boolean isSystemTable(String tableName)
isSystemTable in interface DatabaseInterfacetableName - public boolean supportsNewLinesInSQL()
supportsNewLinesInSQL in interface DatabaseInterfacepublic String getSQLListOfSchemas()
getSQLListOfSchemas in interface DatabaseInterfacepublic int getMaxColumnsInIndex()
getMaxColumnsInIndex in interface DatabaseInterfacepublic boolean supportsErrorHandlingOnBatchUpdates()
supportsErrorHandlingOnBatchUpdates in interface DatabaseInterfacepublic String getSQLInsertAutoIncUnknownDimensionRow(String schemaTable, String keyField, String versionField)
getSQLInsertAutoIncUnknownDimensionRow in interface DatabaseInterfaceschemaTable - the schema-table name to insert intokeyField - The key fieldversionField - the version fieldpublic boolean isExplorable()
isExplorable in interface DatabaseInterfacepublic String getXulOverlayFile()
getXulOverlayFile in interface DatabaseInterfacepublic String quoteSQLString(String string)
DatabaseInterfacequoteSQLString in interface DatabaseInterfacestring - public String getSelectCountStatement(String tableName)
getSelectCountStatement in interface DatabaseInterfacetableName - public String generateColumnAlias(int columnIndex, String suggestedName)
DatabaseInterfacegenerateColumnAlias in interface DatabaseInterfacecolumnIndex - Index of column in querysuggestedName - Suggested column namepublic List<String> parseStatements(String sqlScript)
parseStatements in interface DatabaseInterfacesqlScript - Raw SQL Script to be parsed into executable statements.public List<SqlScriptStatement> getSqlScriptStatements(String sqlScript)
getSqlScriptStatements in interface DatabaseInterfacesqlScript - Raw SQL Script to be parsed into executable statements.public boolean isMySQLVariant()
isMySQLVariant in interface DatabaseInterfacepublic boolean releaseSavepoint()
releaseSavepoint in interface DatabaseInterfacepublic Long getNextBatchIdUsingSequence(String sequenceName, String schemaName, DatabaseMeta dbm, Database ldb) throws KettleDatabaseException
KettleDatabaseExceptionpublic Long getNextBatchIdUsingAutoIncSQL(String autoIncSQL, DatabaseMeta dbm, Database ldb) throws KettleDatabaseException
KettleDatabaseExceptionpublic Long getNextBatchIdUsingLockTables(DatabaseMeta dbm, Database ldb, String schemaName, String tableName, String fieldName) throws KettleDatabaseException
KettleDatabaseExceptionpublic Long getNextBatchId(DatabaseMeta dbm, Database ldb, String schemaName, String tableName, String fieldName) throws KettleDatabaseException
DatabaseInterfacegetNextBatchId in interface DatabaseInterfacedbm - DatabaseMeta objectldb - Database connectionschemaName - Logging Schema NametableName - Logging Table NamefieldName - Batch Id Field nameKettleDatabaseExceptionpublic String getDataTablespaceDDL(VariableSpace variables, DatabaseMeta databaseMeta)
getDataTablespaceDDL in interface DatabaseInterfacevariables - variables used for possible substitutiondatabaseMeta - databaseMeta the database meta used for possible string enclosure of the tablespace. This method needs
this as this is done after environmental substitution.public String getIndexTablespaceDDL(VariableSpace variables, DatabaseMeta databaseMeta)
getIndexTablespaceDDL in interface DatabaseInterfacevariables - variables used for possible substitutiondatabaseMeta - databaseMeta the database meta used for possible string enclosure of the tablespace. This method needs
this as this is done after environmental substitution.public String getTablespaceDDL(VariableSpace variables, DatabaseMeta databaseMeta, String tablespaceName)
variables - variables needed for variable substitution.databaseMeta - databaseMeta needed for it's quoteField method. Since we are doing variable substitution we need to meta
so that we can act on the variable substitution first and then the creation of the entire string that will
be retuned.tablespaceName - tablespaceName name of the tablespace.public Object getValueFromResultSet(ResultSet rs, ValueMetaInterface val, int i) throws KettleDatabaseException
getValueFromResultSet in interface DatabaseInterfacers - The result set to useval - The description of the value to retrievei - the index on which we need to retrieve the value, 0-based.KettleDatabaseExceptionpublic boolean useSafePoints()
useSafePoints in interface DatabaseInterfacepublic boolean supportsErrorHandling()
supportsErrorHandling in interface DatabaseInterfacepublic String getSQLValue(ValueMetaInterface valueMeta, Object valueData, String dateFormat) throws KettleValueException
DatabaseInterfacegetSQLValue in interface DatabaseInterfacevalueMeta - The description of the value. The date format used is taken from this value unless dateFormat is specified
(not null or empty)valueData - The data to convert.KettleValueException - in case there is a data conversion error.public String getSafeFieldname(String fieldname)
getSafeFieldname in interface DatabaseInterfacefieldname - value to sanitizepublic String getSequenceNoMaxValueOption()
getSequenceNoMaxValueOption in interface DatabaseInterfacepublic boolean supportsAutoGeneratedKeys()
supportsAutoGeneratedKeys in interface DatabaseInterfacepublic ValueMetaInterface customizeValueFromSQLType(ValueMetaInterface v, ResultSetMetaData rm, int index) throws SQLException
customizeValueFromSQLType in interface DatabaseInterfacev - the determined valueMetaInterfacerm - the sql resultindex - the index to the columnSQLExceptionpublic String getCreateTableStatement()
getCreateTableStatement in interface DatabaseInterface