# Poco

# namespace Data

## Overview

Namespaces: Keywords, MySQL, ODBC, PostgreSQL, SQLite

Classes: AbstractBinder, AbstractBinding, AbstractExtraction, AbstractExtractor, AbstractPreparation, AbstractPreparator, AbstractSessionImpl, AbstractTypeHandler, ArchiveByAgeStrategy, ArchiveStrategy, Binding, BindingException, Bulk, BulkBinding, BulkExtraction, Column, ConnectionFailedException, Connector, CopyBinding, DataException, Date, ExecutionException, ExtractException, Extraction, InternalBulkExtraction, InternalExtraction, JSONRowFormatter, LOB, LOBIOS, LOBInputStream, LOBOutputStream, LOBStreamBuf, LengthExceededException, Limit, LimitException, MetaColumn, NoDataException, NotConnectedException, NotSupportedException, PooledSessionHolder, PooledSessionImpl, Position, Preparation, Range, RecordSet, Row, RowDataMissingException, RowFilter, RowFormatter, RowIterator, SQLChannel, Session, SessionFactory, SessionImpl, SessionPool, SessionPoolContainer, SessionPoolExhaustedException, SessionPoolExistsException, SessionUnavailableException, SimpleRowFormatter, Statement, StatementCreator, StatementImpl, Time, Transaction, Transcoder, TypeHandler, UnknownDataBaseException, UnknownTypeException

Types: BulkFnType

Types Aliases: AbstractBindingDeq, AbstractBindingLst, AbstractBindingVec, AbstractExtractionDeq, AbstractExtractionDeqVec, AbstractExtractionLst, AbstractExtractionLstVec, AbstractExtractionVec, AbstractExtractionVecVec, AutoTransaction, BLOB, BLOB, BLOBInputStream, BLOBOutputStream, CLOB, CLOB, CLOBInputStream, CLOBOutputStream, JSON, NullData

Functions: POCO_DATA_INVALID_ROW, operator <<, operator [], swap, tupleBind, tupleExtract, tuplePrepare

## Namespaces

### namespace Keywords

### namespace MySQL

### namespace ODBC

### namespace PostgreSQL

### namespace SQLite

## Classes

### class AbstractBinder

Interface for Binding data types to placeholders.

### class AbstractBinding

AbstractBinding connects a value with a placeholder via an AbstractBinder interface.

### class AbstractExtraction

AbstractExtraction is the interface class that connects output positions to concrete values retrieved via an AbstractExtractor.

### class AbstractExtractor

Interface used to extract data from a single result row.

### class AbstractPreparation

Interface for calling the appropriate AbstractPreparator method

### class AbstractPreparator

Interface used for database preparation where we first have to register all data types (and memory output locations) before extracting data, e.

### class AbstractSessionImpl

A partial implementation of SessionImpl, providing features and properties management.

### class AbstractTypeHandler

Parent class for type handlers.

### class ArchiveByAgeStrategy

Archives rows scheduled for archiving.

### class ArchiveStrategy

The ArchiveStrategy is used by SQLChannel to archive log rows.

### class Binding

Binding maps a value or multiple values (see Binding specializations for STL containers as well as type handlers) to database column(s).

### class BindingException

### class Bulk

### class BulkBinding

A BulkBinding maps a value to a column.

### class BulkExtraction

Specialization for bulk extraction of values from a query result set.

### class Column

Column class is column data container.

### class ConnectionFailedException

### class Connector

A Connector creates SessionImpl objects.

### class CopyBinding

Binding maps a value or multiple values (see Binding specializations for STL containers as well as type handlers) to database column(s).

### class DataException

### class Date

Date class wraps a DateTime and exposes date related interface.

### class ExecutionException

### class ExtractException

### class Extraction

Concrete Data Type specific extraction of values from a query result set.

### class InternalBulkExtraction

Container Data Type specialization extension for extraction of values from a query result set.

### class InternalExtraction

Vector Data Type specialization for extraction of values from a query result set.

### class JSONRowFormatter

Class for JSON formatting of data rows.

### class LOB

Representation of a Large OBject.

### class LOBIOS

The base class for LOBInputStream and LOBOutputStream.

### class LOBInputStream

An input stream for reading from a LOB.

### class LOBOutputStream

An output stream for writing to a LOB.

### class LOBStreamBuf

This is the streambuf class used for reading from and writing to a LOB.

### class LengthExceededException

### class Limit

Limit stores information how many rows a query should return.

### class LimitException

### class MetaColumn

MetaColumn class contains column metadata information.

### class NoDataException

### class NotConnectedException

### class NotSupportedException

### class PooledSessionHolder

This class is used by SessionPool to manage SessionImpl objects.

### class PooledSessionImpl

PooledSessionImpl is a decorator created by SessionPool that adds session pool management to SessionImpl objects.

### class Position

Utility class wrapping unsigned integer.

### class Preparation

Class for calling the appropriate AbstractPreparator method.

### class Range

Range stores information how many rows a query should return.

### class RecordSet

RecordSet provides access to data returned from a query.

### class Row

Row class provides a data type for RecordSet iteration purposes.

### class RowDataMissingException

### class RowFilter

RowFilter class provides row filtering functionality.

### class RowFormatter

Row formatter is an abstract class providing definition for row formatting functionality.

### class RowIterator

RowIterator class.

### class SQLChannel

This Channel implements logging to a SQL database.

### class Session

A Session holds a connection to a Database and creates Statement objects.

### class SessionFactory

A SessionFactory is a singleton class that stores Connectors and allows to create Sessions of the required type: Session ses(SessionFactory::instance().

### class SessionImpl

Interface for Session functionality that subclasses must extend.

### class SessionPool

This class implements session pooling for POCO Data.

### class SessionPoolContainer

This class implements container of session pools.

### class SessionPoolExhaustedException

### class SessionPoolExistsException

### class SessionUnavailableException

### class SimpleRowFormatter

A simple row formatting class.

### class Statement

A Statement is used to execute SQL statements.

### class StatementCreator

A StatementCreator creates Statements.

### class StatementImpl

StatementImpl interface that subclasses must implement to define database dependent query execution.

### class Time

Time class wraps a DateTime and exposes time related interface.

### class Transaction

Transaction helps with transactions in domain logic.

### class Transcoder

Utility class used to convert string data encoding.

### class TypeHandler

Converts Rows to a Type and the other way around.

### class UnknownDataBaseException

### class UnknownTypeException

## Types

### BulkFnType

typedef void (* BulkFnType)(Void);

## Types Aliases

### AbstractBindingDeq

using AbstractBindingDeq = std::deque < AbstractBinding::Ptr >;

### AbstractBindingLst

using AbstractBindingLst = std::list < AbstractBinding::Ptr >;

### AbstractBindingVec

using AbstractBindingVec = std::vector < AbstractBinding::Ptr >;

### AbstractExtractionDeq

using AbstractExtractionDeq = std::deque < AbstractExtraction::Ptr >;

### AbstractExtractionDeqVec

using AbstractExtractionDeqVec = std::vector < AbstractExtractionDeq >;

### AbstractExtractionLst

using AbstractExtractionLst = std::list < AbstractExtraction::Ptr >;

### AbstractExtractionLstVec

using AbstractExtractionLstVec = std::vector < AbstractExtractionLst >;

### AbstractExtractionVec

using AbstractExtractionVec = std::vector < AbstractExtraction::Ptr >;

### AbstractExtractionVecVec

using AbstractExtractionVecVec = std::vector < AbstractExtractionVec >;

### AutoTransaction

using AutoTransaction = Transaction;

### BLOB

using BLOB = LOB < unsigned char >;

### BLOB

using BLOB = LOB < unsigned char >;

### BLOBInputStream

using BLOBInputStream = LOBInputStream < unsigned char >;

### BLOBOutputStream

using BLOBOutputStream = LOBOutputStream < unsigned char >;

### CLOB

using CLOB = LOB < char >;

### CLOB

using CLOB = LOB < char >;

### CLOBInputStream

using CLOBInputStream = LOBInputStream < char >;

### CLOBOutputStream

using CLOBOutputStream = LOBOutputStream < char >;

### JSON

using JSON = std::string;

### NullData

using NullData = NullType;

## Functions

### POCO_DATA_INVALID_ROW

static const std::size_t POCO_DATA_INVALID_ROW = std::numeric_limits < std::size_t >::max();

### operator <<

inline std::ostream & operator << (
std::ostream & os,
const RecordSet & rs
);

inlines

### operator <<

std::ostream & operator << (
std::ostream & os,
const Row & row
);

inlines

### operator []

inline Poco::Dynamic::Var RecordSet::operator[] (
const std::string & name
);

### operator []

inline Poco::Dynamic::Var RecordSet::operator[] (
std::size_t index
);

### operator []

inline Poco::Dynamic::Var & Row::operator[] (
std::size_t col
);

### operator []

inline Poco::Dynamic::Var & Row::operator[] (
const std::string & name
);

### swap

template < typename C > inline void swap(
Column < C > & c1,
Column < C > & c2
) noexcept;

The std::vector<bool> specialization for the Column class.

This specialization is necessary due to the nature of std::vector<bool>. For details, see the standard library implementation of vector<bool> or S. Meyers: "Effective STL" (Copyright Addison-Wesley 2001), Item 18: "Avoid using vector<bool>."

The workaround employed here is using deque<bool> as an internal "companion" container kept in sync with the vector<bool> column data. Creates the Column. Creates the Column. Destroys the Column. Assignment operator. Swaps the column with another one. Returns reference to contained data. Returns the field value in specified row. Returns the field value in specified row. Returns number of rows. Clears and shrinks the storage. Returns column name. Returns column maximum length. Returns column precision. Valid for floating point fields only (zero for other data types). Returns column position. Returns column type. Returns iterator pointing to the beginning of data storage vector. Returns iterator pointing to the end of data storage vector. Column specialization for std::list Creates the Column. Creates the Column. Destroys the Column. Assignment operator. Swaps the column with another one. Returns reference to contained data. Returns the field value in specified row. This is the std::list specialization and std::list is not the optimal solution for cases where random access is needed. However, to allow for compatibility with other containers, this functionality is provided here. To alleviate the problem, an effort is made to start iteration from beginning or end, depending on the position requested. Returns the field value in specified row. Returns number of rows. Clears the storage. Returns column name. Returns column maximum length. Returns column precision. Valid for floating point fields only (zero for other data types). Returns column position. Returns column type. Returns iterator pointing to the beginning of data storage vector. Returns iterator pointing to the end of data storage vector.

### swap

template < typename T > inline void swap(
LOB < T > & b1,
LOB < T > & b2
) noexcept;

### swap

inline void swap(
Session & s1,
Session & s2
);

### swap

inline void swap(
Statement & s1,
Statement & s2
) noexcept;

### tupleBind

template < typename TupleType, typename Type, int N > inline void tupleBind(
std::size_t & pos,
TupleType tuple,
AbstractBinder::Ptr pBinder,
AbstractBinder::Direction dir
);

Specialization of type handler for std::deque. Specialization of type handler for std::vector. Specialization of type handler for std::list. Specialization of type handler for Nullable. Poco::Tuple TypeHandler specializations

### tupleExtract

template < typename TupleType, typename DefValType, typename Type, int N > inline void tupleExtract(
std::size_t & pos,
TupleType tuple,
DefValType defVal,
AbstractExtractor::Ptr pExt
);

### tuplePrepare

template < typename TupleType, typename Type, int N > inline void tuplePrepare(
std::size_t & pos,
TupleType tuple,
AbstractPreparator::Ptr pPreparator
);