com.informix.jdbc

## Interface IfxConnection

All Superinterfaces:
  java.lang.AutoCloseable, java.sql.Connection, Connection2, IfmxConnection, java.sql.Wrapper

All Known Implementing Classes:
  IfxSqliConnect, IfxSqliConnReUsableConnection, IfxXAReusableConnection

    public interface IfxConnection
    extends java.sql.Connection, Connection2, IfmxConnection

IfxConnection is a sub-interface of java.sql.Connection with a few more added Informix specific methods.

### Field Summary

Fields
`static int` `LOGGING_MODE` Database has logging.
`static int` `MODE_ANSI` Database is a mode ansi database.
`static int` `NO_DATABASE` No database associated with this connection.
`static int` `NO_LOGGING_MODE` Database has no logging.
`static int` `TRANSACTION_LAST_COMMITTED` New constant defined for Last Commited as JDK doesnt support it

### Fields inherited from interface java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

### Method Summary

Methods
`IfxProtocol` `createProto()` Create a new protocol instance for this connection
`int` `getBlobCacheSize()`
`java.lang.String` `getclLocale()` Gets the CLIENT_LOCALE locale for connection
`boolean` `getclLocaleProp()`
`java.lang.String` `getConnClassName()` What is the name of the connection class?
`java.lang.String` `getDatabaseProductVersion()`
`int` `getDatabaseType()` What is the database type? NO_DATABASE, ANSI_MODE, LOGGING or NON_LOGGING?
`java.lang.String` `getdbCentury()`
`java.lang.String` `getdbDate()`
`java.lang.String` `getdbEncoding()` Gets the DB_LOCALE encoding for connection
`java.lang.String` `getdbLocale()` Gets the DB_LOCALE locale for connection
`boolean` `getdbLocaleProp()`
`java.lang.String` `getDbName()` Get the name of the database currently connected to, if any.
`java.lang.String` `getDbProductName()` What is the product name of the current Database?
`java.lang.String` `getdbTime()`
`long` `getdbTodayDate()` This method will return the dbTodayDate value
`long` `getdbTodayStart()` This method will return the dbTodayStart value
`java.lang.String` `getDbVersion()` What is the current Database version?
`int` `getFetchBufSize()` This method will return the FET_BUF_SIZE value
`com.informix.jdbc.IfxFParam` `getFPCacheFParam(java.lang.String signature)` Returns a routine's fparam structure based on the routine signature.
`int` `getFPCacheRoutineId(java.lang.String signature)` Returns a routine's id based on the routine signature.
`java.lang.String` `getGeneratedCursor()`
`java.lang.String` `getglDate()`
`java.lang.String` `getglDateTime()`
`boolean` `getIsBigInt()`
`boolean` `getIsBigSerial()`
`java.lang.String` `getJDBCTempDir()` Where the user wants to redirect their temp files
`java.lang.String` `getJDBCVersion()` What is the current JDBC Version?
`int` `getLOMode()`
`boolean` `getMapFloat()` Is JDBC type FLOAT mapped to Informix type Float
`boolean` `getMapReal()` Is Informix type Smallfloat reported as JDBC type REAL
`int` `getMaxLvarcharSize()` Gets maximum size of LVARCHAR supported by server connected to.
`PreparedStatementCache` `getPreparedStatementCache()` Returns the PreparedStatement cache used by this connection
`IfxProtocol` `getProto()` Get the protocol instance for this connection
`java.lang.String` `getProtoClassName()` What is the name of the protocol class?
`Trace` `getProtoTrace()` getProtoTrace Return the protoTrace object instantiated in the IfxConnection constructor.
`int` `getSqlLogicalChar()` Gets SQL_LOGICAL_CHAR onconfig value for the current database
`Trace` `getTrace()` getTrace Return the trace object instantiated in the IfxConnection constructor.
`boolean` `getTrimTrailingSpaces()` Get TrimTrailingSpaces -- if set, trim trailing spaces in IfxChar.fromIfx().
`IfxUDTInfo` `getUDTInfo(IfxColumnInfo colinfo, java.lang.String name)` Fill out UDT metadata given the column metadata
`java.lang.String` `getURL()` What is the URL of this connection
`boolean` `getuseDtenv()`
`java.lang.String` `getUserName()` What is the connection's userName?
`java.lang.String` `getXnameByXid(int xid)`
`boolean` `inXATransaction()` Returns true if start has been called to begin (or resume) an XA transaction.
`boolean` `is90303()` Is the server connected to of version 90303?
`boolean` `is9301()` Is the server connected to of version 9301?
`boolean` `isANSI()` Is the database ANSI?
`boolean` `isANSIJoin()` isANSIJoin This method returns true if the server can understand the ANSI join syntax (7.31 & 9.2).
`boolean` `isAutoFree()` Returns true if the server supports AutoFree feature
`boolean` `isBigintSupported()` isBigintSupported() This function returns true if the server supports Bigint/ Bigserial.
`boolean` `isDbOpen()` Is the database opened?
`boolean` `isDelimIdentSet()`
`boolean` `isDirect()` Whether this is a server-side (direct) connection.
`boolean` `isGLS()` isGLS This method returns true if the server is GLS capable (7.2+).
`boolean` `isIEEEM()` Is the server connected to on a homogenous platform (IEEEM) as the client?
`boolean` `IsLastCommittedSupported()` Returns true if server supportsLast Committed
`boolean` `isLongID()` Is the server connected to suppors Long ID?
`boolean` `isLvcGtThan2kSupported()` Does the server connected to support >2k LVARCHAR
`boolean` `isOnLine()` isOnLine This method returns true if the server is online.
`boolean` `isSysmaster()` isSysmaster This function returns true if sysmaster should be available, (6.0+ and online), false otherwise (se or 5.x).
`boolean` `isUSVER()` Is the server connected to an IUS server?
`boolean` `isXAConnection()` Returns true if the connection is XA as opposed to plain.
`boolean` `isXPS()` Is the server connected to an XPS server?
`boolean` `isXPSVER8_40()` Is the server connected to an 840 server?
`boolean` `isXPSVER8_50()` Is the server connected to an 840 server?
`java.lang.String` `retCapName(java.lang.String capName)`
`void` `setFPCacheInfo(int routineId, java.lang.String signature, com.informix.jdbc.IfxFParam fparam)` Store fastpath function information.
`void` `setIsBigInt(boolean flag)` This function will set and get value based on colinfo information
`void` `setIsBigSerial(boolean flag)`
`java.sql.Savepoint` `setSavepointUnique(java.lang.String name)`

### Methods inherited from interface com.informix.jdbc.Connection2

`getTypeMap`

### Methods inherited from interface com.informix.jdbc.IfmxConnection

`getHDRType, getIFX_USEPUT, getSQLStatementOffset, getUDTInfo, getUDTInfo, isHDREnabled, scrubConnection, scrubConnectionReleasesAllStatements, setIFX_USEPUT`

### Methods inherited from interface java.sql.Connection

`abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap`

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

### Field Detail

#### TRANSACTION_LAST_COMMITTED

    static final int TRANSACTION_LAST_COMMITTED

New constant defined for Last Commited as JDK doesnt support it

See Also:
  Constant Field Values

#### NO_DATABASE

    static final int NO_DATABASE

No database associated with this connection.

See Also:
  Constant Field Values

#### MODE_ANSI

    static final int MODE_ANSI

Database is a mode ansi database.

See Also:
  Constant Field Values

#### LOGGING_MODE

    static final int LOGGING_MODE

Database has logging.

See Also:
  Constant Field Values

#### NO_LOGGING_MODE

    static final int NO_LOGGING_MODE

Database has no logging.

See Also:
  Constant Field Values

### Method Detail

#### getTrace

    Trace getTrace()

getTrace Return the trace object instantiated in the IfxConnection constructor. Note that if no trace arguments are passed via the URL, an empty trace object is still created.

#### getProtoTrace

    Trace getProtoTrace()

getProtoTrace Return the protoTrace object instantiated in the IfxConnection constructor. Note that if no trace arguments are passed via the URL, an empty trace object is still created. This is for protocol tracing only.

#### getGeneratedCursor

    java.lang.String getGeneratedCursor()

#### getDbName

    java.lang.String getDbName()
                               throws java.sql.SQLException

Get the name of the database currently connected to, if any.

Returns:
  Name of the database in a String.
Throws:
  `java.sql.SQLException`

#### getURL

    java.lang.String getURL()
                            throws java.sql.SQLException

What is the URL of this connection

Returns:
  the URL in the connection in a String.
Throws:
  `java.sql.SQLException`

#### getUserName

    java.lang.String getUserName()
                                 throws java.sql.SQLException

What is the connection's userName?

Throws:
  `java.sql.SQLException`

#### getJDBCVersion

    java.lang.String getJDBCVersion()
                                    throws java.sql.SQLException

What is the current JDBC Version?

Throws:
  `java.sql.SQLException`

#### getDatabaseType

    int getDatabaseType()
                        throws java.sql.SQLException

What is the database type? NO_DATABASE, ANSI_MODE, LOGGING or NON_LOGGING?

Throws:
  `java.sql.SQLException`

#### isDbOpen

    boolean isDbOpen()
                     throws java.sql.SQLException

Is the database opened?

Throws:
  `java.sql.SQLException`

#### getDbProductName

    java.lang.String getDbProductName()
                                      throws java.sql.SQLException

What is the product name of the current Database?

Throws:
  `java.sql.SQLException`

#### getDbVersion

    java.lang.String getDbVersion()
                                  throws java.sql.SQLException

What is the current Database version?

Throws:
  `java.sql.SQLException`

#### getProtoClassName

    java.lang.String getProtoClassName()

What is the name of the protocol class?

#### getConnClassName

    java.lang.String getConnClassName()

What is the name of the connection class?

#### isDelimIdentSet

    boolean isDelimIdentSet()

#### is90303

    boolean is90303()

Is the server connected to of version 90303?

#### isLongID

    boolean isLongID()

Is the server connected to suppors Long ID?

#### is9301

    boolean is9301()

Is the server connected to of version 9301?

#### isUSVER

    boolean isUSVER()

Is the server connected to an IUS server?

#### isXPSVER8_40

    boolean isXPSVER8_40()

Is the server connected to an 840 server?

#### isXPSVER8_50

    boolean isXPSVER8_50()

Is the server connected to an 840 server?

#### isXPS

    boolean isXPS()

Is the server connected to an XPS server?

Returns:
  true if yes, false otherwise.

#### isLvcGtThan2kSupported

    boolean isLvcGtThan2kSupported()

Does the server connected to support >2k LVARCHAR

#### getMaxLvarcharSize

    int getMaxLvarcharSize()
                           throws java.sql.SQLException

Gets maximum size of LVARCHAR supported by server connected to.

Throws:
  `java.sql.SQLException`

#### getMapFloat

    boolean getMapFloat()

Is JDBC type FLOAT mapped to Informix type Float

#### getMapReal

    boolean getMapReal()

Is Informix type Smallfloat reported as JDBC type REAL

#### isIEEEM

    boolean isIEEEM()

Is the server connected to on a homogenous platform (IEEEM) as the client?

#### getUDTInfo

    IfxUDTInfo getUDTInfo(IfxColumnInfo colinfo,
                        java.lang.String name)
                          throws java.sql.SQLException

Fill out UDT metadata given the column metadata

Throws:
  `java.sql.SQLException`

#### getBlobCacheSize

    int getBlobCacheSize()

#### isSysmaster

    boolean isSysmaster()

isSysmaster This function returns true if sysmaster should be available, (6.0+ and online), false otherwise (se or 5.x).

#### isANSIJoin

    boolean isANSIJoin()

isANSIJoin This method returns true if the server can understand the ANSI join syntax (7.31 & 9.2).

#### isGLS

    boolean isGLS()

isGLS This method returns true if the server is GLS capable (7.2+).

#### isOnLine

    boolean isOnLine()

isOnLine This method returns true if the server is online. False if server is SE servers.

#### isAutoFree

    boolean isAutoFree()

Returns true if the server supports AutoFree feature

#### getdbDate

    java.lang.String getdbDate()

#### getglDate

    java.lang.String getglDate()

#### getdbTime

    java.lang.String getdbTime()

#### getglDateTime

    java.lang.String getglDateTime()

#### getclLocaleProp

    boolean getclLocaleProp()

#### getdbLocaleProp

    boolean getdbLocaleProp()

#### getuseDtenv

    boolean getuseDtenv()

#### getdbCentury

    java.lang.String getdbCentury()

#### getdbEncoding

    java.lang.String getdbEncoding()

Gets the DB_LOCALE encoding for connection

#### getclLocale

    java.lang.String getclLocale()

Gets the CLIENT_LOCALE locale for connection

#### getdbLocale

    java.lang.String getdbLocale()

Gets the DB_LOCALE locale for connection

#### isANSI

    boolean isANSI()

Is the database ANSI?

#### getSqlLogicalChar

    int getSqlLogicalChar()
                          throws java.sql.SQLException

Gets SQL_LOGICAL_CHAR onconfig value for the current database

Returns:
  The server SQL_LOGICAL_CHAR onconfig value.
Throws:
  `java.sql.SQLException`

#### getXnameByXid

    java.lang.String getXnameByXid(int xid)
                                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### isDirect

    boolean isDirect()

Whether this is a server-side (direct) connection.

#### getJDBCTempDir

    java.lang.String getJDBCTempDir()

Where the user wants to redirect their temp files

#### getProto

    IfxProtocol getProto()

Get the protocol instance for this connection

#### createProto

    IfxProtocol createProto()

Create a new protocol instance for this connection

#### getFetchBufSize

    int getFetchBufSize()

This method will return the FET_BUF_SIZE value

#### getdbTodayDate

    long getdbTodayDate()

This method will return the dbTodayDate value

#### getdbTodayStart

    long getdbTodayStart()

This method will return the dbTodayStart value

#### getFPCacheRoutineId

    int getFPCacheRoutineId(java.lang.String signature)

Returns a routine's id based on the routine signature.

Parameters:
  `signature` - Function signature used as the key to do a look into the fast path cache. If found the routine id will be returned. If not found a -1 will be returned.

#### getFPCacheFParam

    com.informix.jdbc.IfxFParam getFPCacheFParam(java.lang.String signature)

Returns a routine's fparam structure based on the routine signature.

Parameters:
  `signature` - Function signature used as the key to do a look into the fast path cache. If found the fparam will be returned. If not found a null will be returned.

#### setFPCacheInfo

    void setFPCacheInfo(int routineId,
                      java.lang.String signature,
                      com.informix.jdbc.IfxFParam fparam)

Store fastpath function information.

Parameters:
  `routineId` - the function id returned by the server.
  `signature` - the routine signature
  `fparam` - the fparam information returned by the server.

#### getTrimTrailingSpaces

    boolean getTrimTrailingSpaces()

Get TrimTrailingSpaces -- if set, trim trailing spaces in IfxChar.fromIfx().

#### isXAConnection

    boolean isXAConnection()

Returns true if the connection is XA as opposed to plain.

#### inXATransaction

    boolean inXATransaction()

Returns true if start has been called to begin (or resume) an XA transaction.

#### IsLastCommittedSupported

    boolean IsLastCommittedSupported()
                                     throws java.sql.SQLException

Returns true if server supportsLast Committed

Throws:
  `java.sql.SQLException`

#### isBigintSupported

    boolean isBigintSupported()

isBigintSupported() This function returns true if the server supports Bigint/ Bigserial.

#### setIsBigInt

    void setIsBigInt(boolean flag)

This function will set and get value based on colinfo information

#### getIsBigInt

    boolean getIsBigInt()

#### setIsBigSerial

    void setIsBigSerial(boolean flag)

#### getIsBigSerial

    boolean getIsBigSerial()

#### setSavepointUnique

    java.sql.Savepoint setSavepointUnique(java.lang.String name)
                                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### retCapName

    java.lang.String retCapName(java.lang.String capName)

#### getDatabaseProductVersion

    java.lang.String getDatabaseProductVersion()

#### getLOMode

    int getLOMode()

#### getPreparedStatementCache

    PreparedStatementCache getPreparedStatementCache()

Returns the PreparedStatement cache used by this connection

Returns:
  PreparedStatementCache the cache