public class InformixDriver extends CallableDriver
Modifier and Type | Field and Description |
---|---|
static String |
BEGIN
The BEGIN sql.
|
static String |
BEGIN_SPLITED
The BEGIN_SPLITED sql.
|
static String |
DECLARE
The DECLARE sql.
|
static String |
END
The END sql.
|
static String |
END_SPLITED
The END_SPLITED sql.
|
static String |
IF
The IF sql.
|
static String |
IF_BEGIN
The IF_BEGIN sql.
|
static String |
IF_ELSE
The IF_ELSE sql.
|
static String |
IF_END
The IF_END sql.
|
static String |
INFORMIX_DATE_FORMAT
The INFORMIX DATE FORMAT.
|
static String |
INFORMIX_DATETIME_FORMAT
The INFORMIX DATETIME FORMAT.
|
static String |
INFORMIX_HOME_PROP
The INFORMIX client HOME property.
|
static String |
INFORMIX_HOME_VAR
The INFORMIX client HOME variable.
|
static String |
INFORMIX_SERVER
The Constant INFORMIX_SERVER.
|
static String |
INFORMIX_TIME_FORMAT
The INFORMIX TIME FORMAT.
|
static String |
INIT_SQL
The INIT sql.
|
static int |
LINES_LIMIT
The maximum number of lines allowed in the sql block.
|
static int |
MAX_CHAR_SIZE
The maximum char size.
|
static int |
MAX_LVARHAR_SIZE
The maximum lvarchar size.
|
static int |
MAX_NUMBER_PREC_SIZE
The maximum precision size.
|
static int |
MAX_NUMBER_SCALE_SIZE
The maximum scale size.
|
static int |
MAX_STRING_LITERAL_SIZE
The maximum string literal size.
|
static int |
MAX_VARCHAR_SIZE
The maximum varchar size.
|
static String |
ON_EXCEPTION
The ON_EXCEPTION sql.
|
static String |
ON_EXCEPTION_END
The ON_EXCEPTION_END sql.
|
ALLOWED_IDENT_CHARS
BASE_CLASS_PATH, CASE_SENSITIVE_LOWER, CASE_SENSITIVE_LOWER_STR, CASE_SENSITIVE_UNDEFINED, CASE_SENSITIVE_UPPER, CASE_SENSITIVE_UPPER_STR, CMD_OPTIONS_PARAM, DB_PARAM, DDL_TYPE, ETL_CODE, FUNC_TYPE, PROC_TYPE, SERVER_PARAM, TABLE_TYPE
APP, COMMAND, ETL_DRIVER, FORMATTER, IDE_NODE, NO_RANK, WIDGET
Constructor and Description |
---|
InformixDriver() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getInitSql()
Gets init sql.
|
protected int |
_getLinesLimit()
Gets lines limit.
|
protected int |
_getMaxCharSize()
Gets max char size.
|
protected int |
_getMaxPrecision()
Gets max precision.
|
protected int |
_getMaxScale()
Gets the max scale.
|
protected int |
_getMaxStringLiteralSize()
Gets the max string literal size.
|
protected int |
_getMaxVarcharSize()
Gets the max varchar size.
|
String |
convertStringForStorage(String value)
Converts string so it can be used as s part of sql.
|
String |
convertValueForStorage(Object fieldValue,
int fieldType,
boolean isFromTable)
Converts value to string depending on
fieldType so it can be
used as s part of sql. |
String |
getAddColumnSql()
Gets the ADD COLUMN SQL.
|
Object |
getAutotrace(ObjectStorage storage,
Connection connection,
Alias alias,
String sql)
Executes sql and produces real execution plan.
|
String |
getBegin()
Gets the "begin" sql statement.
|
String |
getBeginSplited()
Gets the "begin" token for splited sql.
|
String |
getCallSql(String name)
Gets the "call" sql.
|
String |
getCmdForExternalTool(ObjectStorage storage,
Alias alias,
String sqlFile)
Gets the command line for the external tool.
|
String |
getCreateTableSql(String name,
DataSet dataSet,
boolean isTemporary,
String key,
FieldsRepository fieldsRepository)
Gets the "create table" sql.
|
String |
getCursorLoopEndSql(String name,
DataSet dataSet)
Gets the "loop end" sql for the cursor.
|
String |
getCursorLoopStartSql(String name,
String cursorSql,
DataSet dataSet)
Gets the "loop start" sql for the cursor.
|
String |
getCursorRecAccessSql(String fieldName)
Gets the record access sql for the cursor.
|
String |
getCursorVarName(String field)
Gets the cursor var name.
|
static String |
getDbName(Alias alias)
Gets the database name.
|
String |
getDeclare()
Gets the "declare" sql.
|
String |
getDeclareCursorEndSql()
Gets the "declare cursor end" sql.
|
String |
getDeclareCursorSql(String sql,
String name,
String cursorSql,
DataSet dataSet)
Gets the "declare cursor" sql.
|
String |
getDeclareCursorVarSql(String sql,
DataSet dataSet,
String key,
FieldsRepository fieldsRepository,
Set<String> variables)
Gets the "declare cursor variable" sql.
|
String |
getDefaultFunctionClass()
Gets the default function class name.
|
String |
getDefaultType()
Gets the default database type.
|
String |
getDropSql(String type,
String name)
Gets the "drop" sql.
|
String |
getEnd()
Gets the "end" sql.
|
String |
getEndSplited()
Gets the "end" token for the splited sql statement.
|
Object |
getExplainPlan(ObjectStorage storage,
Connection connection,
Alias alias,
String sql)
Gets the explain plan for the sql.
|
String |
getExternalToolName()
Gets the external tool name.
|
String |
getHome(ObjectStorage storage)
Gets the home folder for the native database client.
|
String |
getIconPath()
Gets the full path to the icon file.
|
String |
getIdentifierName(String name,
String type)
Gets the identifier name.
|
String |
getIf()
Gets the "if" token.
|
String |
getIfBegin()
Gets the "if begin" token.
|
String |
getIfElse()
Gets the "if else" token.
|
String |
getIfEnd()
Gets the "if end" token.
|
String |
getJdbcDriverClassName()
Gets the jdbc driver class name.
|
String |
getLicensePropertyName()
Gets the name of the license property.
|
String |
getMergeStatement(TypedKeyValue<List<String>,List<Object>> fieldsAndValues,
String tableName,
String key)
Gets the merge statement.
|
String |
getMetadataClassName()
Gets the metadata driver class name.
|
String |
getMetadataSelectClause()
Gets the metadata "select" clause.
|
String |
getMetadataWhereClause()
Gets the metadata "where" clause.
|
String |
getName()
Gets the name of the driver.
|
Object |
getObject(ResultSet rs,
int index,
FieldDef fieldDef)
Gets the object from result set.
|
String |
getOnException(OnException onException)
Gets the "on exception" sql.
|
String |
getOnExceptionBegin(OnException onException,
long row)
Gets the "on exception begin" sql.
|
String |
getOnExceptionEnd()
Gets the "on exception end" sql.
|
int |
getParamType(String type)
Gets the parameter type from the output variable type.
|
String[] |
getProperties()
Gets the properties.
|
String |
getPropsWizardResource(String connectionDriver)
Gets the name of the xml file used to create a wizard for editing
properties.
|
String |
getSafeSql(String sql)
Gets the safe sql.
|
static String |
getServer(Alias alias)
Gets the informix server name.
|
String |
getSqlForExternalTool(Alias alias,
String sql,
SqlParser parser)
Gets the sql for external tool.
|
String |
getSqlKeywordsFileName()
Gets the sql keywords file name.
|
String |
getStartTransactionSql()
Get start transaction sql.
|
String |
getTableName(String name)
Gets the table name.
|
String |
getTempTableName(String name)
Gets the temporary table name.
|
String |
getTopSelectClause(int top)
Gets the "top select" clause.
|
String |
getTopTrailClause(int top)
Gets the "top trail" clause.
|
String |
getTopWhereClause(int top)
Gets the "top where" clause.
|
String |
getType(FieldDef fieldDef,
String key,
FieldsRepository fieldsRepository)
Gets the native field type.
|
String |
getUrlPattern()
Gets the jdbc driver url pattern.
|
String |
getVarDeclare()
Gets the variable declare statement.
|
String |
getVendor()
Gets the vendor.
|
String |
getVersion()
Gets the version of the extension module.
|
int |
getWrongScale()
Gets the wrong scale.
|
String |
getXmlConfigFileName()
Gets the path to the xml configuration file for the module.
|
boolean |
ignoreExceptionsDuringInit()
The "Ignore exceptions during initialization" flag.
|
boolean |
isMergeInNonCallableSupported()
Checks if "merge" statement can be not callable.
|
String[] |
supportedJoinTypes()
Returns supported join types, such as inner join, left outer join etc.
|
String[] |
supportedSetOperations()
Returns names of the supported set operations, such as union, union all,
etc.
|
boolean |
supportsAnonymousBlocks()
"Supports anonymous blocks" flag.
|
String |
supportsAutotrace()
Checks if driver supports autotrace.
|
boolean |
supportsBinaryInProc()
"Supports binary data types in procedures" flag.
|
boolean |
supportsCallableStatement()
"Supports callable statement" flag.
|
boolean |
supportsExplainPlan()
"Supports explain plan" flag.
|
boolean |
supportsExternalTool()
"Supports external tool" flag.
|
boolean |
supportsInnerFunctions()
"Supports inner functions" flag.
|
boolean |
supportsParamsInAnonymousBlocks()
"Supports parameters in anonymous blocks" flag.
|
boolean |
supportsRollbackAfterDDL()
"Supports rollback after ddl" flag.
|
boolean |
typeHasSize(int type,
String nativeDataType)
Returns
true if type has size. |
deleteStagingBinary, getBlob, getCharUsedForColumnsWithSpaces, getClob, getDestinationInfo, getInitSql, getLinesLimit, getMaxCharSize, getMaxPrecision, getMaxScale, getMaxStringLiteralSize, getMaxVarcharSize, getParentDriverName, getVarName, replaceOnException, setBlob, setClob, setInitSql, setLinesLimit, setMaxCharSize, setMaxPrecision, setMaxScale, setMaxStringLiteralSize, setMaxVarcharSize, setParentDriverName, supportsIndexes, supportsScripts, updateStagingBlob, updateStagingClob, value2StorageValue
alwaysEncloseTableAndColumnsInQuotes, captureLog, compareTo, externalToolRequiresRedirect, filter, getAllowedIdentifierChars, getAlterTableAddColumnSql, getAlterTableAddColumnSql, getCaseSensitive, getCmdOptions, getColumns, getConfigFileName, getConnectionFile, getDefaultNull, getDeleteStatement, getDelimiter, getDisplayName, getErrorLinePattern, getExtensionRank, getIdentifierName, getInsertStatement, getLocalUnitClassPath, getNativeType, getObjectCheckSql, getParentDriver, getPostDeclareSql, getSafeDelimiter, getSelectStatement, getSqlForAutotrace, getSqlForExplainPlan, getStringFieldSizeMultiplier, getTablePrefixWhenAddingTable, getType, getUpdateStatement, isEqualDriver, needSeparateConnectionForDdl, requiresExecuteQuery, requiresRollbackAfterSqlError, requiresSeparateConnectionForIndexes, setAlwaysEncloseTableAndColumnsInQuotes, setCaseSensitive, setStringFieldSizeMultiplier, setUpConnection, supportColonInFormatter, supportsLogging, supportsNotNullable, supportsParallelExtract, supportsParallelLoad, supportsParentDriver, supportsPreparedStatement, supportsPreparedStatementInParallelThreads, supportsPreparedStatementInTransaction, tableName2Name
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableMetadataOnWrite, getIoProcessorClassName, getPrecision, ifDoesNotExistSql, ifExistsSql, openCloseConnectionOnDdl, requiresSemicolonInMerge
public static final String INFORMIX_SERVER
public static final String INFORMIX_DATE_FORMAT
public static final String INFORMIX_DATETIME_FORMAT
public static final String INFORMIX_TIME_FORMAT
public static final String INFORMIX_HOME_VAR
public static final String INFORMIX_HOME_PROP
public static int MAX_STRING_LITERAL_SIZE
public static int MAX_VARCHAR_SIZE
public static int MAX_LVARHAR_SIZE
public static int LINES_LIMIT
public static int MAX_CHAR_SIZE
public static int MAX_NUMBER_PREC_SIZE
public static int MAX_NUMBER_SCALE_SIZE
public static final String INIT_SQL
public static final String DECLARE
public static final String BEGIN
public static final String BEGIN_SPLITED
public static final String END
public static final String END_SPLITED
public static final String IF
public static final String IF_BEGIN
public static final String IF_ELSE
public static final String IF_END
public static final String ON_EXCEPTION
public static final String ON_EXCEPTION_END
public static String getDbName(Alias alias)
alias
- the aliaspublic static String getServer(Alias alias)
alias
- the aliasprotected String _getInitSql()
CallableDriver
_getInitSql
in class CallableDriver
protected int _getLinesLimit()
CallableDriver
_getLinesLimit
in class CallableDriver
protected int _getMaxCharSize()
CallableDriver
_getMaxCharSize
in class CallableDriver
protected int _getMaxPrecision()
CallableDriver
_getMaxPrecision
in class CallableDriver
protected int _getMaxScale()
CallableDriver
_getMaxScale
in class CallableDriver
protected int _getMaxStringLiteralSize()
CallableDriver
_getMaxStringLiteralSize
in class CallableDriver
protected int _getMaxVarcharSize()
CallableDriver
_getMaxVarcharSize
in class CallableDriver
public String convertStringForStorage(String value)
Driver
value
- the valuepublic String convertValueForStorage(Object fieldValue, int fieldType, boolean isFromTable)
Driver
fieldType
so it can be
used as s part of sql.fieldValue
- the field valuefieldType
- the field type Types
}isFromTable
- if true the value is coming from result set, otherwise - from
the database cursorpublic Object getAutotrace(ObjectStorage storage, Connection connection, Alias alias, String sql)
Driver
getAutotrace
in interface Driver
getAutotrace
in class AbstractDriver
storage
- the object storageconnection
- the connectionalias
- the aliassql
- the sqlObjectStorage
public String getBegin()
Driver
public String getBeginSplited()
Driver
public String getCallSql(String name)
Driver
name
- the name of the procedurepublic String getCmdForExternalTool(ObjectStorage storage, Alias alias, String sqlFile)
Driver
storage
- the object storagealias
- the aliassqlFile
- the sql fileObjectStorage
public String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary, String key, FieldsRepository fieldsRepository)
Driver
name
- the table namedataSet
- the data setisTemporary
- if true the table is temporarykey
- the key field(s)fieldsRepository
- the fields repositoryFieldsRepository
public String getCursorLoopEndSql(String name, DataSet dataSet)
Driver
name
- the name of the cusrordataSet
- the data setpublic String getCursorLoopStartSql(String name, String cursorSql, DataSet dataSet)
Driver
name
- the name of the cursorcursorSql
- the cursor sqldataSet
- the data setpublic String getCursorRecAccessSql(String fieldName)
Driver
fieldName
- the field namepublic String getCursorVarName(String field)
field
- the fieldpublic String getDeclare()
Driver
public String getDeclareCursorEndSql()
Driver
public String getDeclareCursorSql(String sql, String name, String cursorSql, DataSet dataSet)
Driver
sql
- the sqlname
- the name of the cursorcursorSql
- the cursor sqldataSet
- the data setpublic String getDeclareCursorVarSql(String sql, DataSet dataSet, String key, FieldsRepository fieldsRepository, Set<String> variables)
Driver
sql
- the sqldataSet
- the data setkey
- the key field(s)fieldsRepository
- the fields repositoryvariables
- the variablesFieldsRepository
public String getDefaultFunctionClass()
Driver
Function
public String getDefaultType()
Driver
public String getDropSql(String type, String name)
Driver
type
- the object type. Possible values: PROC_TYPE, FUNC_TYPE,
DDL_TYPE, TABLE_TYPEname
- the object namepublic String getEnd()
Driver
public String getEndSplited()
Driver
public Object getExplainPlan(ObjectStorage storage, Connection connection, Alias alias, String sql)
Driver
storage
- the object storageconnection
- the connectionalias
- the aliassql
- the sqlObjectStorage
public String getExternalToolName()
Driver
public String getHome(ObjectStorage storage)
Driver
getHome
in interface Driver
getHome
in class AbstractDriver
storage
- the object storageObjectStorage
public String getIconPath()
ExtensionModule
public String getIdentifierName(String name, String type)
Driver
getIdentifierName
in interface Driver
getIdentifierName
in class AbstractDriver
name
- the original object nametype
- the type. Possible values: PROC_TYPE, FUNC_TYPE, DDL_TYPE,
TABLE_TYPEpublic String getIf()
Driver
public String getIfBegin()
Driver
public String getIfElse()
Driver
public String getIfEnd()
Driver
public String getJdbcDriverClassName()
Driver
public String getLicensePropertyName()
ExtensionModule
getLicensePropertyName
in interface ExtensionModule
getLicensePropertyName
in class AbstractDriver
public String getMergeStatement(TypedKeyValue<List<String>,List<Object>> fieldsAndValues, String tableName, String key)
Driver
getMergeStatement
in interface Driver
getMergeStatement
in class AbstractDriver
fieldsAndValues
- the fields and valuestableName
- the table namekey
- the key field(s)public String getMetadataClassName()
Driver
public String getMetadataSelectClause()
Driver
public String getMetadataWhereClause()
Driver
public String getName()
Driver
public Object getObject(ResultSet rs, int index, FieldDef fieldDef) throws Exception
Driver
getObject
in interface Driver
getObject
in class CallableDriver
rs
- the result setindex
- the index of the fieldfieldDef
- the field typeException
- in case of any errorpublic String getOnException(OnException onException)
Driver
onException
- the OnExceptionOnException
public String getOnExceptionBegin(OnException onException, long row)
Driver
onException
- the OnExceptionrow
- the rowOnException
public String getOnExceptionEnd()
Driver
public int getParamType(String type)
Driver
type
- the output variable typepublic String[] getProperties()
Driver
getProperties
in interface Driver
getProperties
in class AbstractDriver
public String getPropsWizardResource(String connectionDriver)
Driver
connectionDriver
- the connection driverpublic String getSafeSql(String sql)
Driver
For example table abc does not exist delete from abc -- not safe EXECUTE IMMEDIATE 'delete from abc' -- safe
getSafeSql
in interface Driver
getSafeSql
in class AbstractDriver
sql
- the namepublic String getSqlForExternalTool(Alias alias, String sql, SqlParser parser)
Driver
alias
- the aliassql
- the original sqlparser
- the sql parserpublic String getSqlKeywordsFileName()
Driver
getSqlKeywordsFileName
in interface Driver
getSqlKeywordsFileName
in class AbstractDriver
public String getStartTransactionSql()
Driver
getStartTransactionSql
in interface Driver
getStartTransactionSql
in class AbstractDriver
public String getTableName(String name)
Driver
getTableName
in interface Driver
getTableName
in class AbstractDriver
name
- the namepublic String getTempTableName(String name)
Driver
name
- the namepublic String getTopSelectClause(int top)
Driver
top
- the maximum number of rows to selectpublic String getTopTrailClause(int top)
Driver
top
- the maximum number of rows to selectpublic String getTopWhereClause(int top)
Driver
top
- the maximum number of rows to selectpublic String getType(FieldDef fieldDef, String key, FieldsRepository fieldsRepository)
Driver
fieldDef
- the field definitionkey
- the key field(s)fieldsRepository
- the fields repositorypublic String getUrlPattern()
Driver
public String getVarDeclare()
Driver
public String getVendor()
ExtensionModule
public String getVersion()
ExtensionModule
public int getWrongScale()
Driver
getWrongScale
in interface Driver
getWrongScale
in class CallableDriver
public String getXmlConfigFileName()
ExtensionModule
public boolean ignoreExceptionsDuringInit()
Driver
public boolean isMergeInNonCallableSupported()
Driver
isMergeInNonCallableSupported
in interface Driver
isMergeInNonCallableSupported
in class AbstractDriver
public String[] supportedJoinTypes()
Driver
public String[] supportedSetOperations()
Driver
public boolean supportsAnonymousBlocks()
Driver
public String supportsAutotrace()
Driver
supportsAutotrace
in interface Driver
supportsAutotrace
in class AbstractDriver
public boolean supportsBinaryInProc()
Driver
public boolean supportsCallableStatement()
Driver
public boolean supportsExplainPlan()
Driver
public boolean supportsExternalTool()
Driver
public boolean supportsInnerFunctions()
Driver
public boolean supportsParamsInAnonymousBlocks()
Driver
public boolean supportsRollbackAfterDDL()
Driver
public boolean typeHasSize(int type, String nativeDataType)
Driver
true
if type
has size. For example:
Types.VARCHAR has size, Types.INTEGER - doesn't.typeHasSize
in interface Driver
typeHasSize
in class AbstractDriver
type
- the type Types
nativeDataType
- the natice data typepublic String getAddColumnSql()
Driver
getAddColumnSql
in interface Driver
getAddColumnSql
in class AbstractDriver
Copyright © 2010-2020 Toolsverse. All Rights Reserved.