Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

column_type

Represents the database type of a MySQL column.

Synopsis

Defined in header <boost/mysql/column_type.hpp>

enum column_type
Values

Name

Description

tinyint

TINYINT (signed and unsigned).

smallint

SMALLINT (signed and unsigned).

mediumint

MEDIUMINT (signed and unsigned).

int_

INT (signed and unsigned).

bigint

BIGINT (signed and unsigned).

float_

FLOAT (warning: FLOAT(p) where p >= 24 creates a DOUBLE column).

double_

DOUBLE

decimal

DECIMAL

bit

BIT

year

YEAR

time

TIME

date

DATE

datetime

DATETIME

timestamp

TIMESTAMP

char_

CHAR (any length)

varchar

VARCHAR (any length)

binary

BINARY (any length)

varbinary

VARBINARY (any length)

text

TEXT types (TINYTEXT, MEDIUMTEXT, TEXT and LONGTEXT)

blob

BLOB types (TINYBLOB, MEDIUMBLOB, BLOB and LONGBLOB)

enum_

ENUM

set

SET

json

JSON

geometry

GEOMETRY

unknown

None of the known types; maybe a new MySQL type we have no knowledge of.

Description

This represents a database type, as opposed to field_kind, which represents a C++ type.

Unless otherwise noted, the names in this enumeration directly correspond to the names of the types you would use in a CREATE TABLE statement to create a column of this type (e.g. VARCHAR corresponds to column_type::varchar).


PrevUpHomeNext