Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Data::ODBC::SessionImpl Class Reference

#include <SessionImpl.h>

Inheritance diagram for Poco::Data::ODBC::SessionImpl:

Poco::Data::AbstractSessionImpl< C > Poco::Data::SessionImpl Poco::RefCountedObject

List of all members.

Detailed Description

Implements SessionImpl interface.

Definition at line 60 of file SessionImpl.h.

Public Types

typedef bool(C::* FeatureGetter )(const std::string &)
 The setter method for a feature.
typedef void(C::* FeatureSetter )(const std::string &, bool)
typedef Poco::Any(C::* PropertyGetter )(const std::string &)
 The setter method for a property.
typedef void(C::* PropertySetter )(const std::string &, const Poco::Any &)
 The getter method for a feature.

Public Member Functions

void autoBind (const std::string &, bool val)
 Returns autocommit property value.
void autoCommit (const std::string &, bool val)
 Returns true if connection is transaction-capable.
void autoExtract (const std::string &, bool val)
 Returns true if binding is automatic for this session.
void begin ()
 Returns an ODBC StatementImpl.
bool canTransact ()
 Returns the driver capability check configuration value.
void close ()
 Aborts a transaction.
void commit ()
 Starts a transaction.
Poco::Data::StatementImplcreateStatementImpl ()
 Destroys the SessionImpl.
const ConnectionHandledbc () const
 Returns maximum length of SQL statement allowed by driver.
void duplicate () const
bool getEnforceCapability (const std::string &name="")
bool getFeature (const std::string &name)
Poco::Any getMaxFieldSize (const std::string &rName="")
 Sets the max field size (the default used when column size is unknown).
Poco::Any getProperty (const std::string &name)
bool isAutoBind (const std::string &name="")
 Sets automatic binding for the session.
bool isAutoCommit (const std::string &name="")
 Sets autocommit property for the session.
bool isAutoExtract (const std::string &name="")
 Sets automatic extraction for the session.
bool isConnected ()
 Closes the connection.
bool isTransaction ()
 Returns true iff session is connected.
int maxStatementLength ()
 Returns the max field size (the default used when column size is unknown).
int referenceCount () const
void release () const
 Increments the object's reference count.
void rollback ()
 Commits and ends a transaction.
 SessionImpl (const std::string &fileName, Poco::Any maxFieldSize=std::size_t(1024), bool enforceCapability=false, bool autoBind=false, bool autoExtract=false)
void setEnforceCapability (const std::string &, bool val)
 Returns true iff a transaction is in progress.
void setFeature (const std::string &name, bool state)
void setMaxFieldSize (const std::string &rName, const Poco::Any &rValue)
 Returns true if extraction is automatic for this session.
void setProperty (const std::string &name, const Poco::Any &value)
 ~SessionImpl ()
 Creates the SessionImpl. Opens a connection to the database.

Protected Member Functions

void addFeature (const std::string &name, FeatureSetter setter, FeatureGetter getter)
void addProperty (const std::string &name, PropertySetter setter, PropertyGetter getter)

Private Member Functions

void checkError (SQLRETURN rc, const std::string &msg="")
bool isCapable ()
 Opens a connection to the Database.
void open ()

Private Attributes

bool _autoBind
bool _autoExtract
std::string _connect
const ConnectionHandle _db
bool _enforceCapability
Poco::Any _maxFieldSize

Static Private Attributes

 Returns the connection handle.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index