public class SnowflakeHVDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface
Modifier and Type | Field and Description |
---|---|
static String |
WAREHOUSE |
ATTRIBUTE_CLUSTER_DBNAME_PREFIX, ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX, ATTRIBUTE_CLUSTER_PASSWORD_PREFIX, ATTRIBUTE_CLUSTER_PORT_PREFIX, ATTRIBUTE_CLUSTER_USERNAME_PREFIX, ATTRIBUTE_FORCE_IDENTIFIERS_TO_LOWERCASE, ATTRIBUTE_FORCE_IDENTIFIERS_TO_UPPERCASE, ATTRIBUTE_INITIAL_POOL_SIZE, ATTRIBUTE_IS_CLUSTERED, ATTRIBUTE_MAXIMUM_POOL_SIZE, ATTRIBUTE_MSSQL_DOUBLE_DECIMAL_SEPARATOR, ATTRIBUTE_POOLING_PARAMETER_PREFIX, ATTRIBUTE_PORT_NUMBER, ATTRIBUTE_PREFERRED_SCHEMA_NAME, ATTRIBUTE_PREFIX_EXTRA_OPTION, ATTRIBUTE_PRESERVE_RESERVED_WORD_CASE, ATTRIBUTE_QUOTE_ALL_FIELDS, ATTRIBUTE_SQL_CONNECT, ATTRIBUTE_SUPPORTS_BOOLEAN_DATA_TYPE, ATTRIBUTE_SUPPORTS_TIMESTAMP_DATA_TYPE, ATTRIBUTE_USE_POOLING, ATTRIBUTE_USE_RESULT_STREAMING, AUTOINCREMENT_SQL_FOR_BATCH_ID, poolingParameters, releaseSavepoint, SELECT_COUNT_STATEMENT, SEQUENCE_FOR_BATCH_ID
Constructor and Description |
---|
SnowflakeHVDatabaseMeta() |
Modifier and Type | Method and Description |
---|---|
int[] |
getAccessTypeList()
Get the list of possible access types for a database.
|
String |
getAddColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean useAutoinc,
String pk,
boolean semicolon)
Generates the SQL statement to add a column to the specified table
|
int |
getDefaultDatabasePort() |
Map<String,String> |
getDefaultOptions() |
String |
getDriverClass()
Obtain the name of the JDBC driver class that we need to use!
|
String |
getDropColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean useAutoinc,
String pk,
boolean semicolon)
Generates the SQL statement to drop a column from the specified table
|
String |
getExtraOptionIndicator() |
String |
getExtraOptionSeparator() |
String |
getExtraOptionsHelpText() |
String |
getFieldDefinition(ValueMetaInterface v,
String surrogateKey,
String primaryKey,
boolean useAutoinc,
boolean addFieldname,
boolean addCr)
Describe a Value as a field in the database.
|
String |
getLimitClause(int nrRows) |
String |
getModifyColumnStatement(String tableName,
ValueMetaInterface v,
String tk,
boolean useAutoinc,
String pk,
boolean semicolon)
Generates the SQL statement to modify a column in the specified table
|
int |
getNotFoundTK(boolean useAutoinc)
Get the not found technical key.
|
String[] |
getReservedWords() |
String |
getSQLColumnExists(String columnname,
String tablename) |
String |
getSQLInsertAutoIncUnknownDimensionRow(String schemaTable,
String keyField,
String versionField)
Get the SQL to insert a new empty unknown record in a dimension.
|
String |
getSQLListOfSchemas() |
String |
getSQLQueryColumnFields(String columnname,
String tableName) |
String |
getSQLQueryFields(String tableName)
Returns the minimal SQL to launch in order to determine the layout of the resultset for a given database table
|
String |
getSQLTableExists(String tablename) |
String |
getURL(String hostname,
String port,
String databaseName) |
String[] |
getUsedLibraries() |
boolean |
isFetchSizeSupported()
Checks whether or not the command setFetchSize() is supported by the JDBC driver...
|
boolean |
isRequiringTransactionsOnQueries() |
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 |
supportsBitmapIndex() |
boolean |
supportsErrorHandlingOnBatchUpdates() |
boolean |
supportsIndexes() |
boolean |
supportsRepository() |
boolean |
supportsSynonyms() |
boolean |
supportsTimeStampToDateConversion() |
boolean |
supportsTransactions() |
boolean |
supportsViews() |
addAttribute, addDefaultOptions, addExtraOption, canTest, checkIndexExists, clone, customizeValueFromSQLType, fullExceptionLog, generateColumnAlias, getAccessType, getAttribute, getAttributes, getBackwardsCompatibleSchemaTableCombination, getBackwardsCompatibleTable, getConnectionPoolingProperties, getConnectSQL, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDatabasePortNumberString, getDataTablespace, getDataTablespaceDDL, getDisplayName, getDropTableIfExistsStatement, getEndQuote, getExtraOptions, getExtraOptionValueSeparator, getFieldnameProtector, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getInitialPoolSize, getInitialPoolSizeString, getMaxColumnsInIndex, getMaximumPoolSize, getMaximumPoolSizeString, getMaxTextFieldLength, getMaxVARCHARLength, getName, getNextBatchId, getNextBatchIdUsingAutoIncSQL, getNextBatchIdUsingLockTables, getNextBatchIdUsingSequence, getObjectId, getPartitioningInformation, getPassword, getPluginId, getPluginName, getPreferredSchemaName, getSafeFieldname, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSQLCurrentSequenceValue, getSQLListOfProcedures, getSQLListOfSequences, getSQLLockTables, getSQLNextSequenceValue, getSqlScriptStatements, getSQLSequenceExists, getSQLUnlockTables, getSQLValue, getStartQuote, getSynonymTypes, getTablespaceDDL, getTableTypes, getTruncateTableStatement, getUsername, getValueFromResultSet, getViewTypes, getXulOverlayFile, isChanged, isDefaultingToUppercase, isDisplaySizeTwiceThePrecision, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isMySQLVariant, isPartitioned, isQuoteAllFields, isStreamingResults, isSystemTable, isUsingConnectionPool, isUsingDoubleDecimalAsSchemaTableSeparator, needsPlaceHolder, needsToLockAllTables, onlySpaces, parseStatements, preserveReservedCase, quoteReservedWords, requiresCastToVariousForIsNull, requiresCreateTablePrimaryKeyAppend, requiresName, setAccessType, setAttributes, setChanged, setConnectionPoolingProperties, setConnectSQL, setDatabaseName, setDatabasePortNumberString, setDataTablespace, setDisplayName, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setInitialPoolSize, setInitialPoolSizeString, setMaximumPoolSize, setMaximumPoolSizeString, setName, setObjectId, setPartitioned, setPartitioningInformation, setPassword, setPluginId, setPluginName, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingConnectionPool, setUsingDoubleDecimalAsSchemaTableSeparator, supportsAutoGeneratedKeys, supportsAutoInc, supportsBatchUpdates, supportsBooleanDataType, supportsCatalogs, supportsEmptyTransactions, supportsErrorHandling, supportsFloatRoundingOnUpdate, supportsGetBlob, supportsNewLinesInSQL, supportsOptionsInURL, supportsPreparedStatementMetadataRetrieval, supportsResultSetMetadataRetrievalOnly, supportsSchemas, supportsSequenceNoMaxValueOption, supportsSequences, supportsSetCharacterStream, supportsSetLong, supportsSetMaxRows, supportsTimestampDataType, useSafePoints, useSchemaNameForTableList
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttribute, addDefaultOptions, addExtraOption, checkIndexExists, clone, createSqlScriptParser, customizeValueFromSQLType, generateColumnAlias, getAccessType, getAttribute, getAttributes, getConnectionPoolingProperties, getConnectSQL, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDatabasePortNumberString, getDataTablespace, getDataTablespaceDDL, getDisplayName, getEndQuote, getExtraOptions, getExtraOptionValueSeparator, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getInitialPoolSize, getInitialPoolSizeString, getLegacyColumnName, getMaxColumnsInIndex, getMaximumPoolSize, getMaximumPoolSizeString, getMaxTextFieldLength, getMaxVARCHARLength, getName, getNextBatchId, getObjectId, getPartitioningInformation, getPassword, getPluginId, getPluginName, getPreferredSchemaName, getSafeFieldname, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSQLCurrentSequenceValue, getSQLListOfProcedures, getSQLListOfSequences, getSQLLockTables, getSQLNextSequenceValue, getSqlScriptStatements, getSQLSequenceExists, getSQLUnlockTables, getSQLValue, getStartQuote, getSynonymTypes, getTableTypes, getTruncateTableStatement, getUnsupportedTableOutputMessage, getUsername, getValueFromResultSet, getViewTypes, getXulOverlayFile, isChanged, isDefaultingToUppercase, isDisplaySizeTwiceThePrecision, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isMySQLVariant, isPartitioned, isQuoteAllFields, isStreamingResults, isSystemTable, isUsingConnectionPool, isUsingDoubleDecimalAsSchemaTableSeparator, needsPlaceHolder, needsToLockAllTables, parseStatements, preserveReservedCase, quoteReservedWords, requiresCastToVariousForIsNull, requiresCreateTablePrimaryKeyAppend, setAccessType, setAttributes, setChanged, setConnectionPoolingProperties, setConnectSQL, setDatabaseName, setDatabasePortNumberString, setDataTablespace, setDisplayName, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setInitialPoolSize, setInitialPoolSizeString, setMaximumPoolSize, setMaximumPoolSizeString, setName, setObjectId, setPartitioned, setPartitioningInformation, setPassword, setPluginId, setPluginName, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingConnectionPool, setUsingDoubleDecimalAsSchemaTableSeparator, supportsAutoGeneratedKeys, supportsAutoInc, supportsBatchUpdates, supportsBooleanDataType, supportsCatalogs, supportsEmptyTransactions, supportsErrorHandling, supportsFloatRoundingOnUpdate, supportsGetBlob, supportsNewLinesInSQL, supportsOptionsInURL, supportsPreparedStatementMetadataRetrieval, supportsResultSetMetadataRetrievalOnly, supportsSchemas, supportsSequenceNoMaxValueOption, supportsSequences, supportsSetCharacterStream, supportsSetLong, supportsSetMaxRows, supportsStandardTableOutput, supportsTimestampDataType, useSafePoints, useSchemaNameForTableList
public static final String WAREHOUSE
public int[] getAccessTypeList()
DatabaseInterface
getAccessTypeList
in interface DatabaseInterface
getAccessTypeList
in class BaseDatabaseMeta
public int getDefaultDatabasePort()
getDefaultDatabasePort
in interface DatabaseInterface
getDefaultDatabasePort
in class BaseDatabaseMeta
public Map<String,String> getDefaultOptions()
getDefaultOptions
in interface DatabaseInterface
getDefaultOptions
in class BaseDatabaseMeta
public boolean isFetchSizeSupported()
BaseDatabaseMeta
isFetchSizeSupported
in interface DatabaseInterface
isFetchSizeSupported
in class BaseDatabaseMeta
public String getDriverClass()
DatabaseInterface
getDriverClass
in interface DatabaseInterface
public String getURL(String hostname, String port, String databaseName)
getURL
in interface DatabaseInterface
hostname
- the hostnameport
- the port as a stringdatabaseName
- the database namepublic String getAddColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon)
getAddColumnStatement
in interface DatabaseInterface
tablename
- The table to addv
- The column defined as a valuetk
- the name of the technical key fielduseAutoinc
- 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 getDropColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon)
getDropColumnStatement
in interface DatabaseInterface
getDropColumnStatement
in class BaseDatabaseMeta
tablename
- The table to addv
- The column defined as a valuetk
- the name of the technical key fielduseAutoinc
- 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 getSQLListOfSchemas()
getSQLListOfSchemas
in interface DatabaseInterface
getSQLListOfSchemas
in class BaseDatabaseMeta
public String getModifyColumnStatement(String tableName, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon)
getModifyColumnStatement
in interface DatabaseInterface
tableName
- The table to addv
- The column defined as a valuetk
- the name of the technical key fielduseAutoinc
- 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 getFieldDefinition(ValueMetaInterface v, String surrogateKey, String primaryKey, boolean useAutoinc, boolean addFieldname, boolean addCr)
DatabaseInterface
getFieldDefinition
in interface DatabaseInterface
v
- The value to describesurrogateKey
- The field that's going to be the technical keyprimaryKey
- The field that's going to be the primary keyuseAutoinc
- Use autoincrement or notaddFieldname
- Add the fieldname to the definition or notaddCr
- Add a cariage return at the end of the definition or not.public String[] getUsedLibraries()
getUsedLibraries
in interface DatabaseInterface
public String getLimitClause(int nrRows)
getLimitClause
in interface DatabaseInterface
getLimitClause
in class BaseDatabaseMeta
nrRows
- The number of rows to which we want to limit the result of the query.public String getSQLQueryFields(String tableName)
getSQLQueryFields
in interface DatabaseInterface
getSQLQueryFields
in class BaseDatabaseMeta
tableName
- The name of the table to determine the layout forpublic String getSQLTableExists(String tablename)
getSQLTableExists
in interface DatabaseInterface
getSQLTableExists
in class BaseDatabaseMeta
tablename
- The table to verify the existance forpublic String getSQLColumnExists(String columnname, String tablename)
getSQLColumnExists
in interface DatabaseInterface
getSQLColumnExists
in class BaseDatabaseMeta
columnname
- The column to verify the existance fortablename
- The table to verify the existance forpublic int getNotFoundTK(boolean useAutoinc)
DatabaseInterface
getNotFoundTK
in interface DatabaseInterface
getNotFoundTK
in class BaseDatabaseMeta
useAutoinc
- Whether or not we want to use an auto increment fieldDatabaseInterface.getNotFoundTK(boolean)
public String getExtraOptionSeparator()
getExtraOptionSeparator
in interface DatabaseInterface
getExtraOptionSeparator
in class BaseDatabaseMeta
public String getExtraOptionIndicator()
getExtraOptionIndicator
in interface DatabaseInterface
getExtraOptionIndicator
in class BaseDatabaseMeta
public boolean supportsTransactions()
supportsTransactions
in interface DatabaseInterface
supportsTransactions
in class BaseDatabaseMeta
public boolean supportsTimeStampToDateConversion()
supportsTimeStampToDateConversion
in interface DatabaseInterface
supportsTimeStampToDateConversion
in class BaseDatabaseMeta
public boolean supportsBitmapIndex()
supportsBitmapIndex
in interface DatabaseInterface
supportsBitmapIndex
in class BaseDatabaseMeta
public boolean supportsViews()
supportsViews
in interface DatabaseInterface
supportsViews
in class BaseDatabaseMeta
public boolean supportsSynonyms()
supportsSynonyms
in interface DatabaseInterface
supportsSynonyms
in class BaseDatabaseMeta
public String[] getReservedWords()
getReservedWords
in interface DatabaseInterface
getReservedWords
in class BaseDatabaseMeta
public String getExtraOptionsHelpText()
getExtraOptionsHelpText
in interface DatabaseInterface
getExtraOptionsHelpText
in class BaseDatabaseMeta
public String getSQLInsertAutoIncUnknownDimensionRow(String schemaTable, String keyField, String versionField)
getSQLInsertAutoIncUnknownDimensionRow
in interface DatabaseInterface
getSQLInsertAutoIncUnknownDimensionRow
in class BaseDatabaseMeta
schemaTable
- the schema-table name to insert intokeyField
- The key fieldversionField
- the version fieldpublic boolean supportsIndexes()
supportsIndexes
in interface DatabaseInterface
public String quoteSQLString(String string)
DatabaseInterface
quoteSQLString
in interface DatabaseInterface
quoteSQLString
in class BaseDatabaseMeta
string
- The String to escapepublic boolean releaseSavepoint()
BaseDatabaseMeta
releaseSavepoint
in interface DatabaseInterface
releaseSavepoint
in class BaseDatabaseMeta
public boolean supportsErrorHandlingOnBatchUpdates()
supportsErrorHandlingOnBatchUpdates
in interface DatabaseInterface
supportsErrorHandlingOnBatchUpdates
in class BaseDatabaseMeta
public boolean isRequiringTransactionsOnQueries()
isRequiringTransactionsOnQueries
in interface DatabaseInterface
isRequiringTransactionsOnQueries
in class BaseDatabaseMeta
public boolean supportsRepository()
supportsRepository
in interface DatabaseInterface
supportsRepository
in class BaseDatabaseMeta
Copyright © 2019 Hitachi Vantara. All rights reserved.