Library: Data/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, createStatementImpl, dbc, getEnforceCapability, getMaxFieldSize, isAutoBind, isAutoCommit, isAutoExtract, isConnected, isTransaction, maxStatementLength, rollback, setEnforceCapability, setMaxFieldSize
SessionImpl(
const std::string & fileName,
Poco::Any maxFieldSize = std::size_t (1024),
bool enforceCapability = false,
bool autoBind = false,
bool autoExtract = false
);
Creates the SessionImpl. Opens a connection to the database
~SessionImpl();
Destroys the SessionImpl.
void autoBind(
const std::string & param43,
bool val
);
Sets automatic binding for the session.
void autoCommit(
const std::string & param42,
bool val
);
Sets autocommit property for the session.
void autoExtract(
const std::string & param44,
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
Poco::Data::StatementImpl * createStatementImpl();
Returns an ODBC StatementImpl
const ConnectionHandle & dbc() const;
Returns the connection handle.
bool getEnforceCapability(
const std::string & name = ""
);
Returns the driver capability check configuration value.
Poco::Any getMaxFieldSize(
const std::string & rName = ""
);
Returns the max field size (the default used when column size is unknown).
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 and only if session is connected.
bool isTransaction();
Returns true if and only if a transaction is in progress.
int maxStatementLength();
Returns maximum length of SQL statement allowed by driver.
void rollback();
Aborts a transaction
void setEnforceCapability(
const std::string & param41,
bool val
);
Configures session to enforce driver capability check after connection. If capability check is enforced and driver is not capable, connection is terminated. Since some drivers do not cooperate, the default behavior is not checking capability.
void setMaxFieldSize(
const std::string & rName,
const Poco::Any & rValue
);
Sets the max field size (the default used when column size is unknown).