MariaDB Connector/C Types and definitions

You are viewing an old version of this article. View the current version here.

MariaDB Connector/C provides the following types and definitions.

Enumeration types

enum mysql_option

enum mysql_option is used as a parameter in mysql_optionsv() and mysql_get_optionsv() API functions. For a list of integral constants and their meanings please check the documentation of mysql_get_optionsv().

enum enum_mysql_timestamp_type

enum enum_mysql_timestamp_type is used in MYSQL_TIME structure and indicates the type. It has the following constants:

  • MYSQL_TIMESTAMP_NONE
  • MYSQL_TIMESTAMP_ERROR
  • MYSQL_TIMESTAMP_DATE
  • MYSQL_TIMESTAMP_DATETIME
  • MYSQL_TIMESTAMP_TIME

enum mysql_set_option

enum mysql_set_option is used as a parameter in mysql_set_server_option() and has the following constants:

  • MYSQL_OPTIONS_MULTI_STATEMENTS_ON
  • MYSQL_OPTIONS_MULTI_STATEMENTS_OFF

enum enum_field_types

enum field_types describes the different field types used by MariaDB ] and has the following constants:

  • MYSQL_TYPE_DECIMAL
  • MYSQL_TYPE_TINY
  • MYSQL_TYPE_SHORT
  • MYSQL_TYPE_LONG
  • MYSQL_TYPE_FLOAT
  • MYSQL_TYPE_DOUBLE
  • MYSQL_TYPE_NULL
  • MYSQL_TYPE_TIMESTAMP
  • MYSQL_TYPE_LONGLONG
  • MYSQL_TYPE_INT24
  • MYSQL_TYPE_DATE
  • MYSQL_TYPE_TIME
  • MYSQL_TYPE_DATETIME
  • MYSQL_TYPE_YEAR
  • MYSQL_TYPE_NEWDATE
  • MYSQL_TYPE_VARCHAR
  • MYSQL_TYPE_BIT
  • MYSQL_TYPE_TIMESTAMP2
  • MYSQL_TYPE_DATETIME2
  • MYSQL_TYPE_TIME2
  • MYSQL_TYPE_JSON
  • MYSQL_TYPE_NEWDECIMAL
  • MYSQL_TYPE_ENUM
  • MYSQL_TYPE_SET
  • MYSQL_TYPE_TINY_BLOB
  • MYSQL_TYPE_MEDIUM_BLOB
  • MYSQL_TYPE_LONG_BLOB
  • MYSQL_TYPE_BLOB
  • MYSQL_TYPE_VAR_STRING
  • MYSQL_TYPE_STRING
  • MYSQL_TYPE_GEOMETRY

enum mysql_enum_shutdown_level

enum mysql_enum_shutdown_level is used as a parameter in mysql_server_shutdown() and has the following constants:

  • SHUTDOWN_DEFAULT
  • KILL_QUERY
  • KILL_CONNECTION

Definitions

Field flags

The following field flags are used in MYSQL_FIELD structure.

FlagValueDescription
NOT_NULL_FLAG1Field can't be NULL
PRI_KEY_FLAG2Field is part of primary key
UNIQUE_KEY_FLAG4Field is part of unique key
MULTIPLE_KEY_FLAG8Field is part of a key
BLOB_FLAG16Field is a blob
UNSIGNED_FLAG32Field is unsigned integer
ZEROFILL_FLAG64Field is zero filled
BINARY_FLAG128Field is binary
ENUM_FLAG256Field is enum
AUTO_INCREMENT_FLAG512Field is an autoincrement field
TIMESTAMP_FLAG1024Field is a timestamp
SET_FLAG2048Field is a set
NO_DEFAULT_VALUE_FLAG4096Field has no default value
ON_UPDATE_NOW_FLAG8192A field is update it will get the current time value (NOW())
NUM_FLAG32768Field is numeric

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.