Poco::Data::MySQL

class SessionImpl

Library: Data/MySQL
Package: MySQL
Header: Poco/Data/MySQL/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: begin, close, commit, createStatementImpl, getInsertId, isConnected, isTransaction, rollback, setInsertId

Constructors

SessionImpl

SessionImpl(
    const std::string & connectionString
);

Creates the SessionImpl. Opens a connection to the database

Connection string format:

<str> == <assignment> | <assignment> ';' <str>
<assignment> == <name> '=' <value>
<name> == 'host' | 'port' | 'user' | 'password' | 'db' } 'compress' | 'auto-reconnect'
<value> == [~;]*

for compress and auto-reconnect correct values are true/false for port - numeric in decimal notation

Destructor

~SessionImpl

~SessionImpl();

Destroys the SessionImpl.

Member Functions

begin virtual

virtual void begin();

Starts a transaction

close virtual

virtual void close();

Closes the connection

commit virtual

virtual void commit();

Commits and ends a transaction

createStatementImpl virtual

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

Returns an MySQL StatementImpl

getInsertId inline

Poco::Any getInsertId(
    const std::string & param13
);

Get insert id

isConnected virtual

virtual bool isConnected();

Returns true if and only if session is connected.

isTransaction virtual

virtual bool isTransaction();

Returns true if and only if a transaction is in progress.

rollback virtual

virtual void rollback();

Aborts a transaction

setInsertId inline

void setInsertId(
    const std::string & param11,
    const Poco::Any & param12
);

Try to set insert id - do nothing.