Poco::Data::SQLite

class Utility

Library: Data/SQLite
Package: SQLite
Header: Poco/Data/SQLite/Utility.h

Description

Various utility functions for SQLite, mostly return code handling

Member Summary

Member Functions: getColumnType, lastError, throwException

Types

TypeMap

typedef std::map < std::string, MetaColumn::ColumnDataType > TypeMap;

Maps SQLite column declared types to Poco::Data types through static TypeMap member. Note: SQLite is type-agnostic and it is the end-user responsibility to ensure that column declared data type corresponds to the type of data actually held in the database. Column types are case-insensitive.

Member Functions

getColumnType static

static MetaColumn::ColumnDataType getColumnType(
    sqlite3_stmt * pStmt,
    std::size_t pos
);

Returns column data type.

lastError static

static std::string lastError(
    sqlite3 * pDb
);

Retreives the last error code from sqlite and converts it to a string

throwException static

static void throwException(
    int rc,
    const std::string & addErrMsg = std::string ()
);

Throws for an error code the appropriate exception