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!
|
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 |
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() |
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 |
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 |
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, wait
getAddColumnStatement, getDriverClass, getFieldDefinition, getModifyColumnStatement, getURL, getUsedLibraries
public 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 DatabaseInterface
public void setPluginId(String pluginId)
setPluginId
in interface DatabaseInterface
pluginId
- The plugin ID to set.public String getPluginName()
getPluginName
in interface DatabaseInterface
public void setPluginName(String pluginName)
setPluginName
in interface DatabaseInterface
pluginName
- The plugin name to set.public abstract int[] getAccessTypeList()
DatabaseInterface
getAccessTypeList
in interface DatabaseInterface
public int getAccessType()
getAccessType
in interface DatabaseInterface
public void setAccessType(int accessType)
setAccessType
in interface DatabaseInterface
accessType
- The accessType to set.public boolean isChanged()
isChanged
in interface DatabaseInterface
public void setChanged(boolean changed)
setChanged
in interface DatabaseInterface
changed
- The changed to set.public String getName()
getName
in interface DatabaseInterface
public void setName(String name)
setName
in interface DatabaseInterface
name
- The connection Name to set.public String getDisplayName()
getDisplayName
in interface DatabaseInterface
public void setDisplayName(String displayName)
setDisplayName
in interface DatabaseInterface
displayName
- The un-escaped connection Name to set.public String getDatabaseName()
getDatabaseName
in interface DatabaseInterface
public void setDatabaseName(String databaseName)
setDatabaseName
in interface DatabaseInterface
databaseName
- The databaseName to set.public void setDatabasePortNumberString(String databasePortNumberString)
setDatabasePortNumberString
in interface DatabaseInterface
databasePortNumberString
- The databasePortNumber string to set.public String getDatabasePortNumberString()
getDatabasePortNumberString
in interface DatabaseInterface
public String getHostname()
getHostname
in interface DatabaseInterface
public void setHostname(String hostname)
setHostname
in interface DatabaseInterface
hostname
- The hostname to set.public ObjectId getObjectId()
getObjectId
in interface DatabaseInterface
public void setObjectId(ObjectId id)
setObjectId
in interface DatabaseInterface
id
- The id to set.public String getPassword()
getPassword
in interface DatabaseInterface
public void setPassword(String password)
setPassword
in interface DatabaseInterface
password
- The password to set.public String getServername()
getServername
in interface DatabaseInterface
public void setServername(String servername)
setServername
in interface DatabaseInterface
servername
- The servername to set.public String getDataTablespace()
getDataTablespace
in interface DatabaseInterface
public void setDataTablespace(String dataTablespace)
setDataTablespace
in interface DatabaseInterface
dataTablespace
- The data tablespace to set.public String getIndexTablespace()
getIndexTablespace
in interface DatabaseInterface
public void setIndexTablespace(String indexTablespace)
setIndexTablespace
in interface DatabaseInterface
indexTablespace
- The index tablespace to set.public String getUsername()
getUsername
in interface DatabaseInterface
public void setUsername(String username)
setUsername
in interface DatabaseInterface
username
- The username to set.public Properties getAttributes()
getAttributes
in interface DatabaseInterface
public void setAttributes(Properties attributes)
setAttributes
in interface DatabaseInterface
attributes
- The extra attributes to set on this database connection.public Object clone()
clone
in interface DatabaseInterface
clone
in class Object
public int getDefaultDatabasePort()
getDefaultDatabasePort
in interface DatabaseInterface
public boolean supportsSetCharacterStream()
supportsSetCharacterStream
in interface DatabaseInterface
public boolean supportsAutoInc()
supportsAutoInc
in interface DatabaseInterface
public String getLimitClause(int nrRows)
getLimitClause
in interface DatabaseInterface
nrRows
- The number of rows to which we want to limit the result of the query.public int getNotFoundTK(boolean use_autoinc)
DatabaseInterface
getNotFoundTK
in interface DatabaseInterface
use_autoinc
- Whether or not we want to use an auto increment fieldpublic String getSQLNextSequenceValue(String sequenceName)
getSQLNextSequenceValue
in interface DatabaseInterface
sequenceName
- The sequence namepublic String getSQLCurrentSequenceValue(String sequenceName)
getSQLCurrentSequenceValue
in interface DatabaseInterface
sequenceName
- The sequence to checkpublic String getSQLSequenceExists(String sequenceName)
getSQLSequenceExists
in interface DatabaseInterface
sequenceName
- The sequence to checkpublic boolean isFetchSizeSupported()
isFetchSizeSupported
in interface DatabaseInterface
public boolean needsPlaceHolder()
needsPlaceHolder
in interface DatabaseInterface
public boolean supportsSchemas()
supportsSchemas
in interface DatabaseInterface
public boolean supportsCatalogs()
supportsCatalogs
in interface DatabaseInterface
public boolean supportsEmptyTransactions()
supportsEmptyTransactions
in interface DatabaseInterface
public String getFunctionSum()
getFunctionSum
in interface DatabaseInterface
public String getFunctionAverage()
getFunctionAverage
in interface DatabaseInterface
public String getFunctionMinimum()
getFunctionMinimum
in interface DatabaseInterface
public String getFunctionMaximum()
getFunctionMaximum
in interface DatabaseInterface
public String getFunctionCount()
getFunctionCount
in interface DatabaseInterface
public String getSchemaTableCombination(String schema_name, String table_part)
getSchemaTableCombination
in interface DatabaseInterface
schema_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 DatabaseInterface
public int getMaxVARCHARLength()
getMaxVARCHARLength
in interface DatabaseInterface
public boolean supportsTransactions()
supportsTransactions
in interface DatabaseInterface
public boolean supportsSequences()
supportsSequences
in interface DatabaseInterface
public boolean supportsBitmapIndex()
supportsBitmapIndex
in interface DatabaseInterface
public boolean supportsSetLong()
supportsSetLong
in interface DatabaseInterface
public String getDropColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
getDropColumnStatement
in interface DatabaseInterface
tablename
- 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 DatabaseInterface
public boolean quoteReservedWords()
quoteReservedWords
in interface DatabaseInterface
public String getStartQuote()
getStartQuote
in interface DatabaseInterface
public String getEndQuote()
getEndQuote
in interface DatabaseInterface
public boolean supportsRepository()
supportsRepository
in interface DatabaseInterface
public String[] getTableTypes()
getTableTypes
in interface DatabaseInterface
public String[] getViewTypes()
getViewTypes
in interface DatabaseInterface
public String[] getSynonymTypes()
getSynonymTypes
in interface DatabaseInterface
public boolean useSchemaNameForTableList()
useSchemaNameForTableList
in interface DatabaseInterface
public boolean supportsViews()
supportsViews
in interface DatabaseInterface
public boolean supportsSynonyms()
supportsSynonyms
in interface DatabaseInterface
public String getSQLListOfProcedures()
getSQLListOfProcedures
in interface DatabaseInterface
public String getSQLListOfSequences()
getSQLListOfSequences
in interface DatabaseInterface
public String getTruncateTableStatement(String tableName)
getTruncateTableStatement
in interface DatabaseInterface
tableName
- The table to be truncated.public String getSQLQueryFields(String tableName)
getSQLQueryFields
in interface DatabaseInterface
tableName
- The name of the table to determine the layout forpublic boolean supportsFloatRoundingOnUpdate()
supportsFloatRoundingOnUpdate
in interface DatabaseInterface
public String getSQLLockTables(String[] tableNames)
getSQLLockTables
in interface DatabaseInterface
tableNames
- The names of the tables to lockpublic String getSQLUnlockTables(String[] tableNames)
getSQLUnlockTables
in interface DatabaseInterface
tableNames
- The names of the tables to unlockpublic boolean supportsTimeStampToDateConversion()
supportsTimeStampToDateConversion
in interface DatabaseInterface
public boolean supportsBatchUpdates()
supportsBatchUpdates
in interface DatabaseInterface
public boolean supportsBooleanDataType()
supportsBooleanDataType
in interface DatabaseInterface
public void setSupportsBooleanDataType(boolean b)
setSupportsBooleanDataType
in interface DatabaseInterface
b
- Set to true if the database supports a boolean, bit, logical, ... datatypepublic boolean supportsTimestampDataType()
supportsTimestampDataType
in interface DatabaseInterface
public void setSupportsTimestampDataType(boolean b)
setSupportsTimestampDataType
in interface DatabaseInterface
b
- Set to true if the database supports the Timestamp data type (nanosecond precision and all)public boolean preserveReservedCase()
preserveReservedCase
in interface DatabaseInterface
public void setPreserveReservedCase(boolean b)
setPreserveReservedCase
in interface DatabaseInterface
b
- Set to true if reserved words' case should be preservedpublic boolean isDefaultingToUppercase()
isDefaultingToUppercase
in interface DatabaseInterface
public Map<String,String> getExtraOptions()
getExtraOptions
in interface DatabaseInterface
public void addExtraOption(String databaseTypeCode, String option, String value)
addExtraOption
in interface DatabaseInterface
databaseTypeCode
- The database type code for which the option appliesoption
- The option to setvalue
- The value of the optionpublic String getExtraOptionSeparator()
getExtraOptionSeparator
in interface DatabaseInterface
public String getExtraOptionValueSeparator()
getExtraOptionValueSeparator
in interface DatabaseInterface
public String getExtraOptionIndicator()
getExtraOptionIndicator
in interface DatabaseInterface
public boolean supportsOptionsInURL()
supportsOptionsInURL
in interface DatabaseInterface
public String getExtraOptionsHelpText()
getExtraOptionsHelpText
in interface DatabaseInterface
public boolean supportsGetBlob()
supportsGetBlob
in interface DatabaseInterface
public String getConnectSQL()
getConnectSQL
in interface DatabaseInterface
public void setConnectSQL(String sql)
setConnectSQL
in interface DatabaseInterface
sql
- The SQL to execute right after connectingpublic boolean supportsSetMaxRows()
supportsSetMaxRows
in interface DatabaseInterface
public boolean isUsingConnectionPool()
isUsingConnectionPool
in interface DatabaseInterface
public void setUsingConnectionPool(boolean usePool)
setUsingConnectionPool
in interface DatabaseInterface
usePool
- true if we want to use a database connection poolpublic int getMaximumPoolSize()
getMaximumPoolSize
in interface DatabaseInterface
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize
in interface DatabaseInterface
maximumPoolSize
- the maximum pool sizepublic int getInitialPoolSize()
getInitialPoolSize
in interface DatabaseInterface
public void setInitialPoolSize(int initialPoolSize)
setInitialPoolSize
in interface DatabaseInterface
initialPoolSize
- the initial pool sizepublic boolean isPartitioned()
isPartitioned
in interface DatabaseInterface
public void setPartitioned(boolean clustered)
setPartitioned
in interface DatabaseInterface
clustered
- true if we want to use a database connection poolpublic PartitionDatabaseMeta[] getPartitioningInformation()
getPartitioningInformation
in interface DatabaseInterface
public void setPartitioningInformation(PartitionDatabaseMeta[] clusterInfo)
setPartitioningInformation
in interface DatabaseInterface
clusterInfo
- the available partition/host/databases/port combinations in the clusterpublic Properties getConnectionPoolingProperties()
getConnectionPoolingProperties
in interface DatabaseInterface
public void setConnectionPoolingProperties(Properties properties)
DatabaseInterface
setConnectionPoolingProperties
in interface DatabaseInterface
public String getSQLTableExists(String tablename)
getSQLTableExists
in interface DatabaseInterface
tablename
- The table to verify the existance forpublic String getSQLColumnExists(String columnname, String tablename)
getSQLColumnExists
in interface DatabaseInterface
columnname
- The column to verify the existance fortablename
- The table to verify the existance forpublic boolean needsToLockAllTables()
needsToLockAllTables
in interface DatabaseInterface
public boolean isStreamingResults()
isStreamingResults
in interface DatabaseInterface
public void setStreamingResults(boolean useStreaming)
setStreamingResults
in interface DatabaseInterface
useStreaming
- true if we want the database to stream results (normally this is an option just for MySQL).public boolean isQuoteAllFields()
isQuoteAllFields
in interface DatabaseInterface
public void setQuoteAllFields(boolean quoteAllFields)
setQuoteAllFields
in interface DatabaseInterface
quoteAllFields
- true if we want the database to stream results (normally this is an option just for MySQL).public boolean isForcingIdentifiersToLowerCase()
isForcingIdentifiersToLowerCase
in interface DatabaseInterface
public void setForcingIdentifiersToLowerCase(boolean forceLowerCase)
setForcingIdentifiersToLowerCase
in interface DatabaseInterface
forceLowerCase
- true if all identifiers should be forced to lower casepublic boolean isForcingIdentifiersToUpperCase()
isForcingIdentifiersToUpperCase
in interface DatabaseInterface
public void setForcingIdentifiersToUpperCase(boolean forceUpperCase)
setForcingIdentifiersToUpperCase
in interface DatabaseInterface
forceUpperCase
- true if all identifiers should be forced to upper casepublic boolean isUsingDoubleDecimalAsSchemaTableSeparator()
isUsingDoubleDecimalAsSchemaTableSeparator
in interface DatabaseInterface
public void setUsingDoubleDecimalAsSchemaTableSeparator(boolean useDoubleDecimalSeparator)
setUsingDoubleDecimalAsSchemaTableSeparator
in interface DatabaseInterface
useDoubleDecimalSeparator
- true if we should use a double decimal separator to specify schema/table combinations on MS-SQL serverpublic boolean isRequiringTransactionsOnQueries()
isRequiringTransactionsOnQueries
in interface DatabaseInterface
public String getDatabaseFactoryName()
getDatabaseFactoryName
in interface DatabaseInterface
public String getPreferredSchemaName()
getPreferredSchemaName
in interface DatabaseInterface
public void setPreferredSchemaName(String preferredSchemaName)
setPreferredSchemaName
in interface DatabaseInterface
preferredSchemaName
- 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 DatabaseInterface
database
- a connected databaseschemaName
- tableName
- idx_fields
- KettleDatabaseException
public boolean supportsSequenceNoMaxValueOption()
supportsSequenceNoMaxValueOption
in interface DatabaseInterface
public boolean requiresCreateTablePrimaryKeyAppend()
requiresCreateTablePrimaryKeyAppend
in interface DatabaseInterface
public boolean requiresCastToVariousForIsNull()
requiresCastToVariousForIsNull
in interface DatabaseInterface
public boolean isDisplaySizeTwiceThePrecision()
isDisplaySizeTwiceThePrecision
in interface DatabaseInterface
public boolean supportsPreparedStatementMetadataRetrieval()
supportsPreparedStatementMetadataRetrieval
in interface DatabaseInterface
public boolean supportsResultSetMetadataRetrievalOnly()
supportsResultSetMetadataRetrievalOnly
in interface DatabaseInterface
public boolean isSystemTable(String tableName)
isSystemTable
in interface DatabaseInterface
tableName
- public boolean supportsNewLinesInSQL()
supportsNewLinesInSQL
in interface DatabaseInterface
public String getSQLListOfSchemas()
getSQLListOfSchemas
in interface DatabaseInterface
public int getMaxColumnsInIndex()
getMaxColumnsInIndex
in interface DatabaseInterface
public boolean supportsErrorHandlingOnBatchUpdates()
supportsErrorHandlingOnBatchUpdates
in interface DatabaseInterface
public String getSQLInsertAutoIncUnknownDimensionRow(String schemaTable, String keyField, String versionField)
getSQLInsertAutoIncUnknownDimensionRow
in interface DatabaseInterface
schemaTable
- the schema-table name to insert intokeyField
- The key fieldversionField
- the version fieldpublic boolean isExplorable()
isExplorable
in interface DatabaseInterface
public String getXulOverlayFile()
getXulOverlayFile
in interface DatabaseInterface
public String quoteSQLString(String string)
DatabaseInterface
quoteSQLString
in interface DatabaseInterface
string
- public String getSelectCountStatement(String tableName)
getSelectCountStatement
in interface DatabaseInterface
tableName
- public String generateColumnAlias(int columnIndex, String suggestedName)
DatabaseInterface
generateColumnAlias
in interface DatabaseInterface
columnIndex
- Index of column in querysuggestedName
- Suggested column namepublic List<String> parseStatements(String sqlScript)
parseStatements
in interface DatabaseInterface
sqlScript
- Raw SQL Script to be parsed into executable statements.public List<SqlScriptStatement> getSqlScriptStatements(String sqlScript)
getSqlScriptStatements
in interface DatabaseInterface
sqlScript
- Raw SQL Script to be parsed into executable statements.public boolean isMySQLVariant()
isMySQLVariant
in interface DatabaseInterface
public boolean releaseSavepoint()
releaseSavepoint
in interface DatabaseInterface
public Long getNextBatchIdUsingSequence(String sequenceName, String schemaName, DatabaseMeta dbm, Database ldb) throws KettleDatabaseException
KettleDatabaseException
public Long getNextBatchIdUsingAutoIncSQL(String autoIncSQL, DatabaseMeta dbm, Database ldb) throws KettleDatabaseException
KettleDatabaseException
public Long getNextBatchIdUsingLockTables(DatabaseMeta dbm, Database ldb, String schemaName, String tableName, String fieldName) throws KettleDatabaseException
KettleDatabaseException
public Long getNextBatchId(DatabaseMeta dbm, Database ldb, String schemaName, String tableName, String fieldName) throws KettleDatabaseException
DatabaseInterface
getNextBatchId
in interface DatabaseInterface
dbm
- DatabaseMeta objectldb
- Database connectionschemaName
- Logging Schema NametableName
- Logging Table NamefieldName
- Batch Id Field nameKettleDatabaseException
public String getDataTablespaceDDL(VariableSpace variables, DatabaseMeta databaseMeta)
getDataTablespaceDDL
in interface DatabaseInterface
variables
- 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 DatabaseInterface
variables
- 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 DatabaseInterface
rs
- The result set to useval
- The description of the value to retrievei
- the index on which we need to retrieve the value, 0-based.KettleDatabaseException
public boolean useSafePoints()
useSafePoints
in interface DatabaseInterface
public boolean supportsErrorHandling()
supportsErrorHandling
in interface DatabaseInterface
public String getSQLValue(ValueMetaInterface valueMeta, Object valueData, String dateFormat) throws KettleValueException
DatabaseInterface
getSQLValue
in interface DatabaseInterface
valueMeta
- 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 DatabaseInterface
fieldname
- value to sanitize