|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.shared.SharedObjectBase org.pentaho.di.core.database.DatabaseMeta
public class DatabaseMeta
This class defines the database specific parameters for a certain database type. It also provides static information regarding a number of well known databases.
Field Summary | |
---|---|
static int |
CLOB_LENGTH
Use this length in a String value to indicate that you want to use a CLOB in stead of a normal text field. |
static Comparator<DatabaseMeta> |
comparator
|
static String[] |
dbAccessTypeCode
Short description of the access type, used in XML and the repository. |
static String[] |
dbAccessTypeDesc
Longer description for user interactions. |
static String |
EMPTY_OPTIONS_STRING
The value to store in the attributes so that an empty value doesn't get lost... |
static RepositoryObjectType |
REPOSITORY_ELEMENT_TYPE
|
static int |
TYPE_ACCESS_JNDI
Connect to the database using JNDI. |
static int |
TYPE_ACCESS_NATIVE
Connect natively through JDBC thin driver to the database. |
static int |
TYPE_ACCESS_OCI
Connect to the database using OCI. |
static int |
TYPE_ACCESS_ODBC
Connect to the database using ODBC. |
static int |
TYPE_ACCESS_PLUGIN
Connect to the database using plugin specific method. |
static int |
TYPE_DATABASE_ACCESS
Deprecated. |
static int |
TYPE_DATABASE_AS400
Deprecated. |
static int |
TYPE_DATABASE_CACHE
Deprecated. |
static int |
TYPE_DATABASE_DB2
Deprecated. |
static int |
TYPE_DATABASE_DBASE
Deprecated. |
static int |
TYPE_DATABASE_DERBY
Deprecated. |
static int |
TYPE_DATABASE_EXTENDB
Deprecated. |
static int |
TYPE_DATABASE_FIREBIRD
Deprecated. |
static int |
TYPE_DATABASE_GENERIC
Deprecated. |
static int |
TYPE_DATABASE_GREENPLUM
Deprecated. |
static int |
TYPE_DATABASE_GUPTA
Deprecated. |
static int |
TYPE_DATABASE_H2
Deprecated. |
static int |
TYPE_DATABASE_HYPERSONIC
Deprecated. |
static int |
TYPE_DATABASE_INFOBRIGHT
Deprecated. |
static int |
TYPE_DATABASE_INFORMIX
Deprecated. |
static int |
TYPE_DATABASE_INGRES
Deprecated. |
static int |
TYPE_DATABASE_INTERBASE
Deprecated. |
static int |
TYPE_DATABASE_KINGBASEES
Deprecated. |
static int |
TYPE_DATABASE_LUCIDDB
Deprecated. |
static int |
TYPE_DATABASE_MONETDB
Deprecated. |
static int |
TYPE_DATABASE_MSSQL
Deprecated. |
static int |
TYPE_DATABASE_MYSQL
Deprecated. |
static int |
TYPE_DATABASE_NEOVIEW
Deprecated. |
static int |
TYPE_DATABASE_NETEZZA
Deprecated. |
static int |
TYPE_DATABASE_NONE
Deprecated. |
static int |
TYPE_DATABASE_ORACLE
Deprecated. |
static int |
TYPE_DATABASE_ORACLE_RDB
Deprecated. |
static int |
TYPE_DATABASE_PALO
Deprecated. |
static int |
TYPE_DATABASE_POSTGRES
Deprecated. |
static int |
TYPE_DATABASE_REMEDY_AR_SYSTEM
Deprecated. |
static int |
TYPE_DATABASE_SAPDB
Deprecated. |
static int |
TYPE_DATABASE_SAPR3
Deprecated. |
static int |
TYPE_DATABASE_SQLITE
Deprecated. |
static int |
TYPE_DATABASE_SYBASE
Deprecated. |
static int |
TYPE_DATABASE_SYBASEIQ
Deprecated. |
static int |
TYPE_DATABASE_TERADATA
Deprecated. |
static int |
TYPE_DATABASE_UNIVERSE
Deprecated. |
static int |
TYPE_DATABASE_VERTICA
Deprecated. |
static String |
XML_TAG
|
Constructor Summary | |
---|---|
DatabaseMeta()
Create an empty database connection |
|
DatabaseMeta(Node con)
Reads the information from an XML Node into this new database connection. |
|
DatabaseMeta(String xml)
Constructs a new database using an XML string snippet. |
|
DatabaseMeta(String name,
String type,
String access,
String host,
String db,
String port,
String user,
String pass)
Construct a new database connections. |
Method Summary | |
---|---|
void |
addExtraOption(String databaseTypeCode,
String option,
String value)
Add an extra option to the attributes list |
void |
addOptions()
Add a list of common options for some databases. |
String[] |
checkParameters()
Check the database connection parameters and give back an array of remarks |
void |
clearChanged()
|
Object |
clone()
|
void |
copyVariablesFrom(VariableSpace space)
Copy the variables from another space, without initializing with the defaults. |
String |
environmentSubstitute(String aString)
Substitute the string using the current variable space. |
String[] |
environmentSubstitute(String[] aString)
Replaces environment variables in an array of strings. |
boolean |
equals(Object obj)
|
static DatabaseMeta |
findDatabase(List<? extends SharedObjectInterface> databases,
String dbname)
Find a database with a certain name in an arraylist of databases. |
static DatabaseMeta |
findDatabase(List<DatabaseMeta> databases,
ObjectId id)
Find a database with a certain ID in an arraylist of databases. |
String |
generateColumnAlias(int columnIndex,
String suggestedName)
|
int |
getAccessType()
Return the type of database access. |
static int |
getAccessType(String dbaccess)
|
String |
getAccessTypeDesc()
Gets you a short description of the type of database access. |
static String |
getAccessTypeDesc(int dbaccess)
|
static String |
getAccessTypeDescLong(int dbaccess)
|
static int[] |
getAccessTypeList(String dbTypeDesc)
|
String |
getAddColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean use_autoinc,
String pk,
boolean semicolon)
|
Properties |
getAttributes()
|
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
This method returns a boolean for the new variable check boxes. |
Properties |
getConnectionPoolingProperties()
|
Properties |
getConnectionProperties()
|
String |
getConnectSQL()
|
DatabaseFactoryInterface |
getDatabaseFactory()
|
DatabaseInterface |
getDatabaseInterface()
|
static DatabaseInterface |
getDatabaseInterface(String databaseType)
Search for the right type of DatabaseInterface object and clone it. |
static DatabaseInterface[] |
getDatabaseInterfaces()
|
static Map<String,DatabaseInterface> |
getDatabaseInterfacesMap()
|
String |
getDatabaseName()
Return the name of the database. |
String |
getDatabasePortNumberString()
Return the port on which the database listens as a String. |
String |
getDatabaseTypeDesc()
Deprecated. This is actually the plugin ID |
String |
getDataTablespace()
|
int |
getDefaultDatabasePort()
|
String |
getDescription()
|
String |
getDriverClass()
|
String |
getDropColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean use_autoinc,
String pk,
boolean semicolon)
|
String |
getEndQuote()
|
String |
getExtraOptionIndicator()
|
Map<String,String> |
getExtraOptions()
|
String |
getExtraOptionSeparator()
|
String |
getExtraOptionsHelpText()
|
String |
getExtraOptionValueSeparator()
|
List<RowMetaAndData> |
getFeatureSummary()
|
String |
getFieldDefinition(ValueMetaInterface v,
String tk,
String pk,
boolean use_autoinc)
|
String |
getFieldDefinition(ValueMetaInterface v,
String tk,
String pk,
boolean use_autoinc,
boolean add_fieldname,
boolean add_cr)
|
String |
getFunctionAverage()
|
String |
getFunctionCount()
|
String |
getFunctionMaximum()
|
String |
getFunctionMinimum()
|
String |
getFunctionSum()
|
String |
getHostname()
Return the hostname of the machine on which the database runs. |
String |
getIndexTablespace()
|
int |
getInitialPoolSize()
|
String |
getLimitClause(int nrRows)
|
int |
getMaxColumnsInIndex()
|
int |
getMaximumPoolSize()
|
int |
getMaxTextFieldLength()
Get the maximum length of a text field for this database connection. |
String |
getModifyColumnStatement(String tablename,
ValueMetaInterface v,
String tk,
boolean use_autoinc,
String pk,
boolean semicolon)
|
String |
getName()
Returns the name of the database connection |
Long |
getNextBatchId(Database ldb,
String schemaName,
String tableName,
String fieldName)
|
int |
getNotFoundTK(boolean use_autoinc)
|
int |
getNrReservedWords(RowMetaInterface fields)
Checks the fields specified for reserved words |
ObjectId |
getObjectId()
Returns the database ID of this database connection if a repository was used before. |
ObjectRevision |
getObjectRevision()
|
VariableSpace |
getParentVariableSpace()
Get the parent of the variable space. |
PartitionDatabaseMeta[] |
getPartitioningInformation()
|
PartitionDatabaseMeta |
getPartitionMeta(String partitionId)
Finds the partition metadata for the given partition iD |
String |
getPassword()
Get the password to log into the database on this connection. |
String |
getPluginId()
The plugin ID of the database interface |
static int |
getPortForDBType(String strtype,
String straccess)
|
String |
getPreferredSchemaName()
|
String |
getQuotedSchemaTableCombination(String schemaName,
String tableName)
Calculate the schema-table combination, usually this is the schema and table separated with a dot. |
RepositoryDirectoryInterface |
getRepositoryDirectory()
Not used in this case, simply return root / |
RepositoryObjectType |
getRepositoryElementType()
|
String[] |
getReservedWords()
|
String |
getSchemaTableCombination(String schemaName,
String tableName)
Deprecated. please use getQuotedSchemaTableCombination() |
String |
getSeqNextvalSQL(String sequenceName)
|
String |
getServername()
|
String |
getSQLColumnExists(String columnname,
String tablename)
|
String |
getSQLCurrentSequenceValue(String sequenceName)
|
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 |
getSQLQueryFields(String tableName)
|
String |
getSQLSequenceExists(String sequenceName)
|
String |
getSQLServerInstance()
|
String |
getSQLTableExists(String tablename)
|
String |
getSQLUnlockTables(String[] tableNames)
|
String |
getStartQuote()
|
String[] |
getSynonymTypes()
|
String[] |
getTableTypes()
|
String |
getTruncateTableStatement(String schema,
String tableName)
|
String |
getURL()
|
String |
getURL(String partitionId)
|
String |
getUsername()
Get the username to log into the database on this connection. |
Object |
getValueFromResultSet(ResultSet rs,
ValueMetaInterface val,
int i)
|
String |
getVariable(String variableName)
Get the value of a variable. |
String |
getVariable(String variableName,
String defaultValue)
Get the value of a variable with a default in case the variable is not found. |
String[] |
getViewTypes()
|
String |
getXML()
Describes the Object implementing this interface as XML |
boolean |
hasChanged()
|
boolean |
hasDotInField(String fieldname)
|
int |
hashCode()
|
boolean |
hasSpacesInField(String fieldname)
Detects if a field has spaces in the name. |
boolean |
hasSpecialCharInField(String fieldname)
Detects if a field has spaces in the name. |
void |
initializeVariablesFrom(VariableSpace parent)
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()). |
void |
injectVariables(Map<String,String> prop)
Inject variables. |
boolean |
isClob(ValueMetaInterface v)
|
boolean |
isDisplaySizeTwiceThePrecision()
|
boolean |
isExplorable()
|
boolean |
isFetchSizeSupported()
|
boolean |
isForcingIdentifiersToLowerCase()
|
boolean |
isForcingIdentifiersToUpperCase()
|
boolean |
isInNeedOfQuoting(String fieldname)
Determines whether or not this field is in need of quoting: - When the fieldname contains spaces - When the fieldname is a reserved word |
boolean |
isMySQLVariant()
|
boolean |
isPartitioned()
|
boolean |
isQuoteAllFields()
|
boolean |
isRequiringTransactionsOnQueries()
|
boolean |
isReservedWord(String word)
Returns true if the string specified is a reserved word on this database type. |
boolean |
isStreamingResults()
|
boolean |
isSystemTable(String tableName)
|
boolean |
isUsingConnectionPool()
|
boolean |
isUsingDoubleDecimalAsSchemaTableSeparator()
|
String[] |
listVariables()
List the variables (not the values) that are currently in the variable space. |
boolean |
needsPlaceHolder()
Indicates the need to insert a placeholder (0) for auto increment fields. |
boolean |
needsToLockAllTables()
|
String |
quoteField(String field)
Returns a quoted field if this is needed: contains spaces, is a reserved word, ... |
boolean |
quoteReservedWords()
|
void |
quoteReservedWords(RowMetaInterface fields)
Changes the names of the fields to their quoted equivalent if this is needed |
String |
quoteSQLString(String string)
|
void |
replaceMeta(DatabaseMeta databaseMeta)
|
boolean |
replaceReservedWords(RowMetaInterface fields)
Checks the fields specified for reserved words and quotes them. |
boolean |
requiresCastToVariousForIsNull()
|
boolean |
requiresCreateTablePrimaryKeyAppend()
|
void |
setAccessType(int access_type)
Set the type of database access. |
void |
setAttributes(Properties attributes)
Set extra attributes on this database connection |
void |
setChanged()
|
void |
setChanged(boolean ch)
|
void |
setConnectionPoolingProperties(Properties properties)
|
void |
setConnectSQL(String sql)
|
void |
setDatabaseInterface(DatabaseInterface databaseInterface)
Set the system dependend database interface for this database metadata definition |
void |
setDatabaseType(String type)
|
void |
setDataTablespace(String data_tablespace)
|
void |
setDBName(String databaseName)
Set the name of the database. |
void |
setDBPort(String db_port)
Sets the port on which the database listens. |
void |
setDefault()
Set default values for an Oracle database. |
void |
setDescription(String description)
|
void |
setForcingIdentifiersToLowerCase(boolean forceLowerCase)
|
void |
setForcingIdentifiersToUpperCase(boolean forceUpperCase)
|
void |
setHostname(String hostname)
Sets the hostname of the machine on which the database runs. |
void |
setIndexTablespace(String index_tablespace)
|
void |
setInitialPoolSize(int initalPoolSize)
|
void |
setMaximumPoolSize(int maximumPoolSize)
|
void |
setName(String name)
Sets the name of the database connection. |
void |
setObjectId(ObjectId id)
|
void |
setObjectRevision(ObjectRevision objectRevision)
|
void |
setParentVariableSpace(VariableSpace parent)
Set the parent variable space |
void |
setPartitioned(boolean partitioned)
|
void |
setPartitioningInformation(PartitionDatabaseMeta[] partitionInfo)
|
void |
setPassword(String password)
Sets the password to log into the database on this connection. |
void |
setPreferredSchemaName(String preferredSchemaName)
|
void |
setQuoteAllFields(boolean quoteAllFields)
|
void |
setRepositoryDirectory(RepositoryDirectoryInterface repositoryDirectory)
|
void |
setServername(String servername)
|
void |
setSQLServerInstance(String instanceName)
|
void |
setStreamingResults(boolean useStreaming)
|
void |
setSupportsBooleanDataType(boolean b)
|
void |
setUsername(String username)
Sets the username to log into the database on this connection. |
void |
setUsingConnectionPool(boolean usePool)
|
void |
setUsingDoubleDecimalAsSchemaTableSeparator(boolean useDoubleDecimalSeparator)
|
void |
setValues(DatabaseMeta info)
|
void |
setValues(String name,
String type,
String access,
String host,
String db,
String port,
String user,
String pass)
|
void |
setVariable(String variableName,
String variableValue)
Sets a variable in the Kettle Variables list. |
void |
shareVariablesWith(VariableSpace space)
Share a variable space from another variable space. |
String |
stripCR(String sbsql)
|
String |
stripCR(StringBuffer sbsql)
|
boolean |
supportsAutoinc()
|
boolean |
supportsBatchUpdates()
|
boolean |
supportsBitmapIndex()
|
boolean |
supportsBooleanDataType()
|
boolean |
supportsCatalogs()
|
boolean |
supportsEmptyTransactions()
|
boolean |
supportsErrorHandlingOnBatchUpdates()
|
boolean |
supportsFloatRoundingOnUpdate()
|
boolean |
supportsGetBlob()
|
boolean |
supportsOptionsInURL()
|
boolean |
supportsPreparedStatementMetadataRetrieval()
|
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 |
supportsTimeStampToDateConversion()
|
boolean |
supportsTransactions()
Deprecated. because the same database can support transactions or not. It all depends on the database setup. Therefor, we look at the database metadata DatabaseMetaData.supportsTransactions() in stead of this. |
boolean |
supportsViews()
|
String |
testConnection()
|
String |
toString()
|
boolean |
useSchemaNameForTableList()
|
String |
verifyAndModifyDatabaseName(List<DatabaseMeta> databases,
String oldname)
Verify the name of the database and if required, change it if it already exists in the list of databases. |
Methods inherited from class org.pentaho.di.shared.SharedObjectBase |
---|
getChangedDate, isShared, setChangedDate, setShared |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.pentaho.di.shared.SharedObjectInterface |
---|
getChangedDate, isShared, setShared |
Field Detail |
---|
public static final String XML_TAG
public static final RepositoryObjectType REPOSITORY_ELEMENT_TYPE
public static final Comparator<DatabaseMeta> comparator
public static final int TYPE_DATABASE_NONE
public static final int TYPE_DATABASE_MYSQL
public static final int TYPE_DATABASE_ORACLE
public static final int TYPE_DATABASE_AS400
public static final int TYPE_DATABASE_ACCESS
public static final int TYPE_DATABASE_MSSQL
public static final int TYPE_DATABASE_DB2
public static final int TYPE_DATABASE_POSTGRES
public static final int TYPE_DATABASE_CACHE
public static final int TYPE_DATABASE_INFORMIX
public static final int TYPE_DATABASE_SYBASE
public static final int TYPE_DATABASE_GUPTA
public static final int TYPE_DATABASE_DBASE
public static final int TYPE_DATABASE_FIREBIRD
public static final int TYPE_DATABASE_SAPDB
public static final int TYPE_DATABASE_HYPERSONIC
public static final int TYPE_DATABASE_GENERIC
public static final int TYPE_DATABASE_SAPR3
public static final int TYPE_DATABASE_INGRES
public static final int TYPE_DATABASE_INTERBASE
public static final int TYPE_DATABASE_EXTENDB
public static final int TYPE_DATABASE_TERADATA
public static final int TYPE_DATABASE_ORACLE_RDB
public static final int TYPE_DATABASE_H2
public static final int TYPE_DATABASE_NETEZZA
public static final int TYPE_DATABASE_UNIVERSE
public static final int TYPE_DATABASE_SQLITE
public static final int TYPE_DATABASE_DERBY
public static final int TYPE_DATABASE_REMEDY_AR_SYSTEM
public static final int TYPE_DATABASE_PALO
public static final int TYPE_DATABASE_SYBASEIQ
public static final int TYPE_DATABASE_GREENPLUM
public static final int TYPE_DATABASE_MONETDB
public static final int TYPE_DATABASE_KINGBASEES
public static final int TYPE_DATABASE_VERTICA
public static final int TYPE_DATABASE_NEOVIEW
public static final int TYPE_DATABASE_LUCIDDB
public static final int TYPE_DATABASE_INFOBRIGHT
public static final int TYPE_ACCESS_NATIVE
public static final int TYPE_ACCESS_ODBC
public static final int TYPE_ACCESS_OCI
public static final int TYPE_ACCESS_PLUGIN
public static final int TYPE_ACCESS_JNDI
public static final String[] dbAccessTypeCode
public static final String[] dbAccessTypeDesc
public static final int CLOB_LENGTH
public static final String EMPTY_OPTIONS_STRING
Constructor Detail |
---|
public DatabaseMeta(String name, String type, String access, String host, String db, String port, String user, String pass)
name
- The database nametype
- The type of databaseaccess
- The type of database accesshost
- The hostname or IP addressdb
- The database nameport
- The port on which the database listens.user
- The usernamepass
- The passwordpublic DatabaseMeta()
public DatabaseMeta(String xml) throws KettleXMLException
connection
tags.
xml
- The XML string to parse
KettleXMLException
- in case there is an XML parsing errorpublic DatabaseMeta(Node con) throws KettleXMLException
con
- The Node to read the data from
KettleXMLException
Method Detail |
---|
public void setDefault()
public void addOptions()
public DatabaseInterface getDatabaseInterface()
public void setDatabaseInterface(DatabaseInterface databaseInterface)
databaseInterface
- the system dependend database interfacepublic static final DatabaseInterface getDatabaseInterface(String databaseType) throws KettleDatabaseException
databaseType
- the type of DatabaseInterface to look for (description)
KettleDatabaseException
- when the type could not be found or referenced.public ObjectId getObjectId()
getObjectId
in interface RepositoryElementInterface
getObjectId
in interface RepositoryObjectInterface
public void setObjectId(ObjectId id)
setObjectId
in interface RepositoryElementInterface
public Object clone()
clone
in class Object
public void replaceMeta(DatabaseMeta databaseMeta)
public void setValues(String name, String type, String access, String host, String db, String port, String user, String pass)
public void setDatabaseType(String type)
public void setValues(DatabaseMeta info)
public void setName(String name)
setName
in interface RepositoryElementInterface
name
- The name of the database connectionpublic String getName()
getName
in interface RepositoryElementInterface
getName
in interface RepositoryObjectInterface
getName
in interface SharedObjectInterface
public String getPluginId()
public int getAccessType()
TYPE_ACCESS_NATIVE
TYPE_ACCESS_ODBC
TYPE_ACCESS_OCI
public void setAccessType(int access_type)
access_type
- The access type.public String getDatabaseTypeDesc()
public String getAccessTypeDesc()
public String getHostname()
public void setHostname(String hostname)
hostname
- The hostname of the machine on which the database runs.public String getDatabasePortNumberString()
public void setDBPort(String db_port)
db_port
- The port number on which the database listenspublic String getDatabaseName()
public void setDBName(String databaseName)
databaseName
- The new name of the databasepublic String getUsername()
public void setUsername(String username)
username
- The usernamepublic String getPassword()
public void setPassword(String password)
password
- the password to log into the database on this connection.public void setServername(String servername)
servername
- the Informix servernamepublic String getServername()
public String getDataTablespace()
public void setDataTablespace(String data_tablespace)
public String getIndexTablespace()
public void setIndexTablespace(String index_tablespace)
public void setChanged()
public void setChanged(boolean ch)
public boolean hasChanged()
public void clearChanged()
public String toString()
toString
in class Object
public Properties getAttributes()
public void setAttributes(Properties attributes)
attributes
- The extra attributes to set on this database connection.public String getXML()
XMLInterface
getXML
in interface XMLInterface
getXML
in interface SharedObjectInterface
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String getURL() throws KettleDatabaseException
KettleDatabaseException
public String getURL(String partitionId) throws KettleDatabaseException
KettleDatabaseException
public Properties getConnectionProperties()
public String getExtraOptionIndicator()
public String getExtraOptionSeparator()
public String getExtraOptionValueSeparator()
public void addExtraOption(String databaseTypeCode, String option, String value)
databaseTypeCode
- The database type code for which the option appliesoption
- The option to setvalue
- The value of the optionpublic boolean supportsTransactions()
public boolean supportsAutoinc()
public boolean supportsSequences()
public String getSQLSequenceExists(String sequenceName)
public boolean supportsBitmapIndex()
public boolean supportsSetLong()
public boolean supportsSchemas()
public boolean supportsCatalogs()
public boolean supportsEmptyTransactions()
public boolean supportsSetCharacterStream()
public int getMaxTextFieldLength()
public static final int getAccessType(String dbaccess)
public static final String getAccessTypeDesc(int dbaccess)
public static final String getAccessTypeDescLong(int dbaccess)
public static final DatabaseInterface[] getDatabaseInterfaces()
public static final Map<String,DatabaseInterface> getDatabaseInterfacesMap()
public static final int[] getAccessTypeList(String dbTypeDesc)
public static final int getPortForDBType(String strtype, String straccess)
public int getDefaultDatabasePort()
public int getNotFoundTK(boolean use_autoinc)
public String getDriverClass()
public String stripCR(String sbsql)
public String stripCR(StringBuffer sbsql)
public String getSeqNextvalSQL(String sequenceName)
public String getSQLCurrentSequenceValue(String sequenceName)
public boolean isFetchSizeSupported()
public boolean needsPlaceHolder()
public String getFunctionSum()
public String getFunctionAverage()
public String getFunctionMaximum()
public String getFunctionMinimum()
public String getFunctionCount()
public String[] checkParameters()
public String getSchemaTableCombination(String schemaName, String tableName)
schemaName
- tableName
-
public String getQuotedSchemaTableCombination(String schemaName, String tableName)
schemaName
- the schema-name or null if no schema is used.tableName
- the table name
public boolean isClob(ValueMetaInterface v)
public String getFieldDefinition(ValueMetaInterface v, String tk, String pk, boolean use_autoinc)
public String getFieldDefinition(ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr)
public String getLimitClause(int nrRows)
public String getSQLQueryFields(String tableName)
tableName
- The table or schema-table combination. We expect this to be quoted properly already!
public String getAddColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
public String getDropColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
public String getModifyColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
public String[] getReservedWords()
public boolean quoteReservedWords()
public String getStartQuote()
public String getEndQuote()
public String quoteField(String field)
field
- The fieldname to check for quoting
public boolean isInNeedOfQuoting(String fieldname)
fieldname
- the fieldname to check if there is a need for quoting
public boolean isReservedWord(String word)
word
- The word to check
public boolean hasSpacesInField(String fieldname)
fieldname
- The fieldname to check for spaces
public boolean hasSpecialCharInField(String fieldname)
fieldname
- The fieldname to check for spaces
public boolean hasDotInField(String fieldname)
public boolean replaceReservedWords(RowMetaInterface fields)
fields
- the list of fields to check
public int getNrReservedWords(RowMetaInterface fields)
fields
- the list of fields to check
public String[] getTableTypes()
public String[] getViewTypes()
public String[] getSynonymTypes()
public boolean useSchemaNameForTableList()
public boolean supportsViews()
public boolean supportsSynonyms()
public String getSQLListOfProcedures()
public String getTruncateTableStatement(String schema, String tableName)
tableName
- The tablename to be truncated
public boolean supportsFloatRoundingOnUpdate()
public String getSQLLockTables(String[] tableNames)
tableNames
- The names of the tables to lock
public String getSQLUnlockTables(String[] tableNames)
tableNames
- The names of the tables to unlock
public List<RowMetaAndData> getFeatureSummary()
public boolean supportsTimeStampToDateConversion()
public boolean supportsBatchUpdates()
public boolean supportsBooleanDataType()
public void setSupportsBooleanDataType(boolean b)
b
- Set to true if the database supports a boolean, bit, logical, ... datatypepublic void quoteReservedWords(RowMetaInterface fields)
fields
- The row of fields to changepublic Map<String,String> getExtraOptions()
public boolean supportsOptionsInURL()
public String getExtraOptionsHelpText()
public boolean supportsGetBlob()
public String getConnectSQL()
public void setConnectSQL(String sql)
sql
- The SQL to execute right after connectingpublic boolean supportsSetMaxRows()
public String verifyAndModifyDatabaseName(List<DatabaseMeta> databases, String oldname)
databases
- the databases to check against.oldname
- the old name of the database
public boolean isUsingConnectionPool()
public void setUsingConnectionPool(boolean usePool)
usePool
- true if we want to use a database connection poolpublic int getMaximumPoolSize()
public void setMaximumPoolSize(int maximumPoolSize)
maximumPoolSize
- the maximum pool sizepublic int getInitialPoolSize()
public void setInitialPoolSize(int initalPoolSize)
initalPoolSize
- the initial pool sizepublic boolean isPartitioned()
public void setPartitioned(boolean partitioned)
partitioned
- true if the connection is set to contain partitioning informationpublic PartitionDatabaseMeta[] getPartitioningInformation()
public void setPartitioningInformation(PartitionDatabaseMeta[] partitionInfo)
partitionInfo
- the available partition/host/databases/port combinations in the clusterpublic PartitionDatabaseMeta getPartitionMeta(String partitionId)
partitionId
- The partition ID to look for
public Properties getConnectionPoolingProperties()
public void setConnectionPoolingProperties(Properties properties)
public String getSQLTableExists(String tablename)
public String getSQLColumnExists(String columnname, String tablename)
public boolean needsToLockAllTables()
public boolean isStreamingResults()
public void setStreamingResults(boolean useStreaming)
useStreaming
- true if we want the database to stream results (normally this is an option just for MySQL).public boolean isQuoteAllFields()
public void setQuoteAllFields(boolean quoteAllFields)
quoteAllFields
- true if all fields in DB should be quoted.public boolean isForcingIdentifiersToLowerCase()
public void setForcingIdentifiersToLowerCase(boolean forceLowerCase)
forceLowerCase
- true if all identifiers should be forced to lower casepublic boolean isForcingIdentifiersToUpperCase()
public void setForcingIdentifiersToUpperCase(boolean forceUpperCase)
forceLowerCase
- true if all identifiers should be forced to upper casepublic static final DatabaseMeta findDatabase(List<? extends SharedObjectInterface> databases, String dbname)
databases
- The ArrayList of databasesdbname
- The name of the database connection
public static final DatabaseMeta findDatabase(List<DatabaseMeta> databases, ObjectId id)
databases
- The ArrayList of databasesid
- The id of the database connection
public void copyVariablesFrom(VariableSpace space)
VariableSpace
copyVariablesFrom
in interface VariableSpace
space
- the space to copy the variables from.public String environmentSubstitute(String aString)
VariableSpace
environmentSubstitute
in interface VariableSpace
aString
- The string to substitute.
public String[] environmentSubstitute(String[] aString)
VariableSpace
environmentSubstitute
in interface VariableSpace
aString
- The array of strings that wants its variables to be replaced.
public VariableSpace getParentVariableSpace()
VariableSpace
getParentVariableSpace
in interface VariableSpace
public void setParentVariableSpace(VariableSpace parent)
VariableSpace
setParentVariableSpace
in interface VariableSpace
parent
- The parent variable space to setpublic String getVariable(String variableName, String defaultValue)
VariableSpace
getVariable
in interface VariableSpace
variableName
- The name of the variabledefaultValue
- The default value in case the variable could not be
found
public String getVariable(String variableName)
VariableSpace
getVariable
in interface VariableSpace
variableName
- The name of the variable
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
VariableSpace
getBooleanValueOfVariable
in interface VariableSpace
variableName
- The variable to look up.defaultValue
- The default value to return.
static method ValueMeta.convertStringToBoolean()
public void initializeVariablesFrom(VariableSpace parent)
VariableSpace
initializeVariablesFrom
in interface VariableSpace
parent
- the parent to start from, or null if root.public String[] listVariables()
VariableSpace
listVariables
in interface VariableSpace
public void setVariable(String variableName, String variableValue)
VariableSpace
setVariable
in interface VariableSpace
variableName
- The name of the variable to setvariableValue
- The value of the variable to set. If the
variableValue is null, the variable is cleared
from the list.public void shareVariablesWith(VariableSpace space)
VariableSpace
shareVariablesWith
in interface VariableSpace
space
- Variable space to be shared.public void injectVariables(Map<String,String> prop)
VariableSpace
injectVariables
in interface VariableSpace
prop
- Properties object containing key-value pairs.public String getSQLServerInstance()
public void setSQLServerInstance(String instanceName)
instanceName
- the SQL Server instancepublic boolean isUsingDoubleDecimalAsSchemaTableSeparator()
public void setUsingDoubleDecimalAsSchemaTableSeparator(boolean useDoubleDecimalSeparator)
useStreaming
- true if we want the database to stream results (normally this is an option just for MySQL).public boolean isRequiringTransactionsOnQueries()
public String testConnection()
public DatabaseFactoryInterface getDatabaseFactory() throws Exception
Exception
public String getPreferredSchemaName()
public void setPreferredSchemaName(String preferredSchemaName)
public RepositoryDirectoryInterface getRepositoryDirectory()
getRepositoryDirectory
in interface RepositoryElementInterface
public void setRepositoryDirectory(RepositoryDirectoryInterface repositoryDirectory)
setRepositoryDirectory
in interface RepositoryElementInterface
public RepositoryObjectType getRepositoryElementType()
getRepositoryElementType
in interface RepositoryElementInterface
public ObjectRevision getObjectRevision()
getObjectRevision
in interface RepositoryElementInterface
public void setObjectRevision(ObjectRevision objectRevision)
setObjectRevision
in interface RepositoryElementInterface
public String getDescription()
getDescription
in interface RepositoryElementInterface
public void setDescription(String description)
setDescription
in interface RepositoryElementInterface
public boolean supportsSequenceNoMaxValueOption()
public boolean requiresCreateTablePrimaryKeyAppend()
public boolean requiresCastToVariousForIsNull()
public boolean isDisplaySizeTwiceThePrecision()
public boolean supportsPreparedStatementMetadataRetrieval()
public boolean isSystemTable(String tableName)
public String getSQLListOfSchemas()
public int getMaxColumnsInIndex()
public boolean supportsErrorHandlingOnBatchUpdates()
public String getSQLInsertAutoIncUnknownDimensionRow(String schemaTable, String keyField, String versionField)
schemaTable
- the schema-table name to insert intokeyField
- The key fieldversionField
- the version field
public boolean isExplorable()
public String getSQLListOfSequences()
public String quoteSQLString(String string)
public String generateColumnAlias(int columnIndex, String suggestedName)
DatabaseInterface.generateColumnAlias(int, String)
public boolean isMySQLVariant()
public Long getNextBatchId(Database ldb, String schemaName, String tableName, String fieldName) throws KettleDatabaseException
KettleDatabaseException
public Object getValueFromResultSet(ResultSet rs, ValueMetaInterface val, int i) throws KettleDatabaseException
KettleDatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |