Class InformixDatabaseMeta

java.lang.Object
org.pentaho.di.core.database.BaseDatabaseMeta
org.pentaho.di.core.database.InformixDatabaseMeta
All Implemented Interfaces:
Cloneable, DatabaseInterface, DatabaseInterfaceExtended

public class InformixDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface
Contains Informix specific information through static final members
Since:
11-mrt-2005
Author:
Matt
  • Constructor Details

    • InformixDatabaseMeta

      public InformixDatabaseMeta()
  • Method Details

    • getAccessTypeList

      public int[] getAccessTypeList()
      Description copied from interface: DatabaseInterface
      Get the list of possible access types for a database.
      Specified by:
      getAccessTypeList in interface DatabaseInterface
      Specified by:
      getAccessTypeList in class BaseDatabaseMeta
      Returns:
      the list of possible access types for a database.
    • getDefaultDatabasePort

      public int getDefaultDatabasePort()
      Specified by:
      getDefaultDatabasePort in interface DatabaseInterface
      Overrides:
      getDefaultDatabasePort in class BaseDatabaseMeta
      Returns:
      the default database port number
    • getNotFoundTK

      public int getNotFoundTK(boolean useAutoinc)
      Description copied from interface: DatabaseInterface
      Get the not found technical key.
      Specified by:
      getNotFoundTK in interface DatabaseInterface
      Overrides:
      getNotFoundTK in class BaseDatabaseMeta
      Parameters:
      useAutoinc - Whether or not we want to use an auto increment field
      Returns:
      the lowest possible technical key to be used as the NOT FOUND row in a slowly changing dimension.
      See Also:
    • getDriverClass

      public String getDriverClass()
      Description copied from interface: DatabaseInterface
      Obtain the name of the JDBC driver class that we need to use!
      Specified by:
      getDriverClass in interface DatabaseInterface
      Returns:
      the name of the JDBC driver class for the specific database
    • getURL

      public String getURL(String hostname, String port, String databaseName)
      Specified by:
      getURL in interface DatabaseInterface
      Parameters:
      hostname - the hostname
      port - the port as a string
      databaseName - the database name
      Returns:
      the URL to use for connecting to the database.
    • needsPlaceHolder

      public boolean needsPlaceHolder()
      Indicates the need to insert a placeholder (0) for auto increment fields.
      Specified by:
      needsPlaceHolder in interface DatabaseInterface
      Overrides:
      needsPlaceHolder in class BaseDatabaseMeta
      Returns:
      true if we need a placeholder for auto increment fields in insert statements.
    • needsToLockAllTables

      public boolean needsToLockAllTables()
      Specified by:
      needsToLockAllTables in interface DatabaseInterface
      Overrides:
      needsToLockAllTables in class BaseDatabaseMeta
      Returns:
      true if the database needs all repository tables to be locked, not just one ref table (R_REPOSITORY_LOG)
    • getSQLQueryFields

      public String getSQLQueryFields(String tableName)
      Description copied from class: BaseDatabaseMeta
      Returns the minimal SQL to launch in order to determine the layout of the resultset for a given database table
      Specified by:
      getSQLQueryFields in interface DatabaseInterface
      Overrides:
      getSQLQueryFields in class BaseDatabaseMeta
      Parameters:
      tableName - The name of the table to determine the layout for
      Returns:
      The SQL to launch.
    • getSQLTableExists

      public String getSQLTableExists(String tablename)
      Specified by:
      getSQLTableExists in interface DatabaseInterface
      Overrides:
      getSQLTableExists in class BaseDatabaseMeta
      Parameters:
      tablename - The table to verify the existance for
      Returns:
      The SQL to execute to verify if the given table exists. If an Exception is thrown for this SQL, we don't have the table.
    • getSQLColumnExists

      public String getSQLColumnExists(String columnname, String tablename)
      Specified by:
      getSQLColumnExists in interface DatabaseInterface
      Overrides:
      getSQLColumnExists in class BaseDatabaseMeta
      Parameters:
      columnname - The column to verify the existance for
      tablename - The table to verify the existance for
      Returns:
      The SQL to execute to verify if the given table exists. If an Exception is thrown for this SQL, we don't have the column.
    • getSQLQueryColumnFields

      public String getSQLQueryColumnFields(String columnname, String tableName)
    • getAddColumnStatement

      public 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
      Specified by:
      getAddColumnStatement in interface DatabaseInterface
      Parameters:
      tablename - The table to add
      v - The column defined as a value
      tk - the name of the technical key field
      useAutoinc - whether or not this field uses auto increment
      pk - the name of the primary key field
      semicolon - whether or not to add a semi-colon behind the statement.
      Returns:
      the SQL statement to add a column to the specified table
    • getModifyColumnStatement

      public 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
      Specified by:
      getModifyColumnStatement in interface DatabaseInterface
      Parameters:
      tablename - The table to add
      v - The column defined as a value
      tk - the name of the technical key field
      useAutoinc - whether or not this field uses auto increment
      pk - the name of the primary key field
      semicolon - whether or not to add a semi-colon behind the statement.
      Returns:
      the SQL statement to modify a column in the specified table
    • getFieldDefinition

      public String getFieldDefinition(ValueMetaInterface v, String tk, String pk, boolean useAutoinc, boolean addFieldName, boolean addCr)
      Description copied from interface: DatabaseInterface
      Describe a Value as a field in the database.
      Specified by:
      getFieldDefinition in interface DatabaseInterface
      Parameters:
      v - The value to describe
      tk - The field that's going to be the technical key
      pk - The field that's going to be the primary key
      useAutoinc - Use autoincrement or not
      addFieldName - Add the fieldname to the definition or not
      addCr - Add a cariage return at the end of the definition or not.
      Returns:
      a value described as a field in this database.
    • getSQLLockTables

      public String getSQLLockTables(String[] tableNames)
      Specified by:
      getSQLLockTables in interface DatabaseInterface
      Overrides:
      getSQLLockTables in class BaseDatabaseMeta
      Parameters:
      tableNames - The names of the tables to lock
      Returns:
      The SQL command to lock database tables for write purposes. null is returned in case locking is not supported on the target database. null is the default value
    • getSQLUnlockTables

      public String getSQLUnlockTables(String[] tableNames)
      Specified by:
      getSQLUnlockTables in interface DatabaseInterface
      Overrides:
      getSQLUnlockTables in class BaseDatabaseMeta
      Parameters:
      tableNames - The names of the tables to unlock
      Returns:
      The SQL command to unlock database tables. null is returned in case locking is not supported on the target database. null is the default value
    • getUsedLibraries

      public String[] getUsedLibraries()
      Specified by:
      getUsedLibraries in interface DatabaseInterface
      Returns:
      the required libraries (in lib) for this database connection.
    • getSQLInsertAutoIncUnknownDimensionRow

      public String getSQLInsertAutoIncUnknownDimensionRow(String schemaTable, String keyField, String versionField)
      Get the SQL to insert a new empty unknown record in a dimension.
      Specified by:
      getSQLInsertAutoIncUnknownDimensionRow in interface DatabaseInterface
      Overrides:
      getSQLInsertAutoIncUnknownDimensionRow in class BaseDatabaseMeta
      Parameters:
      schemaTable - the schema-table name to insert into
      keyField - The key field
      versionField - the version field
      Returns:
      the SQL to insert the unknown record into the SCD.