Class Poco::Data::MySQL::SessionHandle
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Data::MySQL

# class SessionHandle

Library: Data
Package: MySQL
Header: Poco/Data/MySQL/SessionHandle.h

## Description

MySQL session handle

## Member Summary

Member Functions: close, commit, connect, init, operator MYSQL *, options, rollback, startTransaction

## Constructors

### SessionHandle

explicit SessionHandle(
MYSQL * mysql
);

Creates session handle

## Destructor

### ~SessionHandle

~SessionHandle();

Destroy handle, close connection

## Member Functions

### close

void close();

Close connection

### commit

void commit();

Commit transaction

### connect

void connect(
const char * host,
const char * user,
const char * password,
const char * db,
unsigned int port
);

Connect to server

### init

void init(
MYSQL * mysql = 0
);

Initializes the handle if and only if not initialized.

### operator MYSQL *

operator MYSQL * ();

### options

void options(
mysql_option opt
);

Set connection options

### options

void options(
mysql_option opt,
bool b
);

Set connection options

### options

void options(
mysql_option opt,
const char * c
);

Set connection options

### options

void options(
mysql_option opt,
unsigned int i
);

Set connection options

### rollback

void rollback();

Rollback transaction

### startTransaction

void startTransaction();

Start transaction