Poco::Data::ODBC

class SessionImpl

Library: ODBC
Package: ODBC
Header: Poco/Data/ODBC/SessionImpl.h

Description

Implements SessionImpl interface

Inheritance

Direct Base Classes: Poco::Data::AbstractSessionImpl < SessionImpl >

All Base Classes: Poco::Data::AbstractSessionImpl < SessionImpl >

Member Summary

Member Functions: autoBind, autoCommit, autoExtract, begin, canTransact, close, commit, createStatementImpl, dbc, getEnforceCapability, getMaxFieldSize, isAutoBind, isAutoCommit, isAutoExtract, isConnected, isTransaction, maxStatementLength, rollback, setEnforceCapability, setMaxFieldSize

Constructors

SessionImpl

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

Destructor

~SessionImpl

~SessionImpl();

Destroys the SessionImpl.

Member Functions

autoBind

void autoBind(
    const std::string & param37,
    bool val
);

Sets automatic binding for the session.

autoCommit

void autoCommit(
    const std::string & param36,
    bool val
);

Sets autocommit property for the session.

autoExtract

void autoExtract(
    const std::string & param38,
    bool val
);

Sets automatic extraction for the session.

begin

void begin();

Starts a transaction

canTransact

bool canTransact();

Returns true if connection is transaction-capable.

close

void close();

Closes the connection

commit inline

void commit();

Commits and ends a transaction

createStatementImpl

Poco::Data::StatementImpl * createStatementImpl();

Returns an ODBC StatementImpl

dbc inline

const ConnectionHandle & dbc() const;

Returns the connection handle.

getEnforceCapability

bool getEnforceCapability(
    const std::string & name = ""
);

Returns the driver capability check configuration value.

getMaxFieldSize inline

Poco::Any getMaxFieldSize(
    const std::string & rName = ""
);

Returns the max field size (the default used when column size is unknown).

isAutoBind

bool isAutoBind(
    const std::string & name = ""
);

Returns true if binding is automatic for this session.

isAutoCommit

bool isAutoCommit(
    const std::string & name = ""
);

Returns autocommit property value.

isAutoExtract

bool isAutoExtract(
    const std::string & name = ""
);

Returns true if extraction is automatic for this session.

isConnected

bool isConnected();

Returns true iff session is connected.

isTransaction

bool isTransaction();

Returns true iff a transaction is in progress.

maxStatementLength

int maxStatementLength();

Returns maximum length of SQL statement allowed by driver.

rollback inline

void rollback();

Aborts a transaction

setEnforceCapability

void setEnforceCapability(
    const std::string & param35,
    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.

setMaxFieldSize inline

void setMaxFieldSize(
    const std::string & rName,
    const Poco::Any & rValue
);

Sets the max field size (the default used when column size is unknown).