Library: ODBC
Package: ODBC
Header: Poco/Data/ODBC/SessionImpl.h
Implements SessionImpl interface
Direct Base Classes: Poco::Data::AbstractSessionImpl < SessionImpl >
All Base Classes: Poco::Data::AbstractSessionImpl < SessionImpl >
Member Functions: autoBind, autoCommit, autoExtract, begin, canTransact, close, commit, connectorName, createStatementImpl, dataTypeInfo, dbc, getConnectionTimeout, getMaxFieldSize, getQueryTimeout, getTransactionIsolation, hasTransactionIsolation, isAutoBind, isAutoCommit, isAutoExtract, isConnected, isTransaction, isTransactionIsolation, maxStatementLength, open, queryTimeout, rollback, setConnectionTimeout, setMaxFieldSize, setQueryTimeout, setTransactionIsolation
ODBC_TXN_CAPABILITY_UNKNOWN = - 1
SessionImpl(
const std::string & connect,
std::size_t loginTimeout,
std::size_t maxFieldSize = ODBC_MAX_FIELD_SIZE,
bool autoBind = true,
bool autoExtract = true
);
Creates the SessionImpl. Opens a connection to the database. Throws NotConnectedException if connection was not succesful.
SessionImpl(
const std::string & connect,
Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE,
bool enforceCapability = false,
bool autoBind = true,
bool autoExtract = true
);
Deprecated. This function is deprecated and should no longer be used.
Creates the SessionImpl. Opens a connection to the database.
~SessionImpl();
Destroys the SessionImpl.
void autoBind(
const std::string & param26,
bool val
);
Sets automatic binding for the session.
void autoCommit(
const std::string & param25,
bool val
);
Sets autocommit property for the session.
void autoExtract(
const std::string & param27,
bool val
);
Sets automatic extraction for the session.
void begin();
Starts a transaction
bool canTransact();
Returns true if connection is transaction-capable.
void close();
Closes the connection
void commit();
Commits and ends a transaction
const std::string & connectorName() const;
Returns the name of the connector.
Poco::Data::StatementImpl * createStatementImpl();
Returns an ODBC StatementImpl
Poco::Any dataTypeInfo(
const std::string & rName = ""
);
Returns the data types information.
const ConnectionHandle & dbc() const;
Returns the connection handle.
std::size_t getConnectionTimeout();
Returns the session connection timeout value.
Poco::Any getMaxFieldSize(
const std::string & rName = ""
);
Returns the max field size (the default used when column size is unknown).
Poco::Any getQueryTimeout(
const std::string & param29
);
Returns the timeout (in seconds) for queries, or -1 if no timeout has been set.
Poco::UInt32 getTransactionIsolation();
Returns the transaction isolation level.
bool hasTransactionIsolation(
Poco::UInt32
);
Returns true if and only if the transaction isolation level corresponding to the supplied bitmask is supported.
bool isAutoBind(
const std::string & name = ""
);
Returns true if binding is automatic for this session.
bool isAutoCommit(
const std::string & name = ""
);
Returns autocommit property value.
bool isAutoExtract(
const std::string & name = ""
);
Returns true if extraction is automatic for this session.
bool isConnected();
Returns true if session is connected
bool isTransaction();
Returns true if and only if a transaction is in progress.
bool isTransactionIsolation(
Poco::UInt32
);
Returns true if and only if the transaction isolation level corresponds to the supplied bitmask.
int maxStatementLength();
Returns maximum length of SQL statement allowed by driver.
void open(
const std::string & connect = ""
);
Opens a connection to the Database
int queryTimeout() const;
Returns the timeout (in seconds) for queries, or -1 if no timeout has been set.
void rollback();
Aborts a transaction
void setConnectionTimeout(
std::size_t timeout
);
Sets the session connection timeout value.
void setMaxFieldSize(
const std::string & rName,
const Poco::Any & rValue
);
Sets the max field size (the default used when column size is unknown).
void setQueryTimeout(
const std::string & param28,
const Poco::Any & value
);
Sets the timeout (in seconds) for queries. Value must be of type int.
void setTransactionIsolation(
Poco::UInt32 ti
);
Sets the transaction isolation level.
static const std::size_t ODBC_MAX_FIELD_SIZE = 1024u;