class Types (View source)

Class holding type definitions for MySQL and MariaDB.

Methods

__construct(DatabaseInterface $dbi)

No description

array
getUnaryOperators()

Returns list of unary operators.

bool
isUnaryOperator(string $op)

Check whether operator is unary.

array
getNullOperators()

Returns list of operators checking for NULL.

array
getEnumOperators()

ENUM search operators

array
getTextOperators()

TEXT search operators

array
getNumberOperators()

Number search operators

array
getUUIDOperators()

UUID search operators

array
getTypeOperators(string $type, bool $null)

Returns operators for given type

string
getTypeOperatorsHtml(string $type, bool $null, string|null $selectedOperator = null)

Returns operators for given type as html options

string
getTypeDescription(string $type)

Returns the data type description.

string
getTypeClass(string $type)

Returns class of a type, used for functions available for type or default values.

array
getFunctionsClass(string $class)

Returns array of functions available for a class.

array
getFunctions(string $type)

Returns array of functions available for a type.

array
getAllFunctions()

Returns array of all functions available.

array
getAttributes()

Returns array of all attributes available.

array
getColumns()

Returns array of all column types available.

array
getIntegerTypes()

Returns an array of integer types

string
mapAliasToMysqlType(string $alias)

No description

array
getFloatTypes()

Returns an array of float types

array
getIntegerRange(string $type, bool $signed = true)

Returns the min and max values of a given integer type

Details

__construct(DatabaseInterface $dbi)

No description

Parameters

DatabaseInterface $dbi

array getUnaryOperators()

Returns list of unary operators.

Return Value

array

bool isUnaryOperator(string $op)

Check whether operator is unary.

Parameters

string $op

operator name

Return Value

bool

array getNullOperators()

Returns list of operators checking for NULL.

Return Value

array

array getEnumOperators()

ENUM search operators

Return Value

array

array getTextOperators()

TEXT search operators

Return Value

array

array getNumberOperators()

Number search operators

Return Value

array

array getUUIDOperators()

UUID search operators

Return Value

array

array getTypeOperators(string $type, bool $null)

Returns operators for given type

Parameters

string $type

Type of field

bool $null

Whether field can be NULL

Return Value

array

string getTypeOperatorsHtml(string $type, bool $null, string|null $selectedOperator = null)

Returns operators for given type as html options

Parameters

string $type

Type of field

bool $null

Whether field can be NULL

string|null $selectedOperator

Option to be selected

Return Value

string

Generated Html

string getTypeDescription(string $type)

Returns the data type description.

Parameters

string $type

The data type to get a description.

Return Value

string

string getTypeClass(string $type)

Returns class of a type, used for functions available for type or default values.

Parameters

string $type

The data type to get a class.

Return Value

string

array getFunctionsClass(string $class)

Returns array of functions available for a class.

Parameters

string $class

The class to get function list.

Return Value

array

array getFunctions(string $type)

Returns array of functions available for a type.

Parameters

string $type

The data type to get function list.

Return Value

array

array getAllFunctions()

Returns array of all functions available.

Return Value

array

array getAttributes()

Returns array of all attributes available.

Return Value

array

array getColumns()

Returns array of all column types available.

VARCHAR, TINYINT, TEXT and DATE are listed first, based on estimated popularity.

Return Value

array

array getIntegerTypes()

Returns an array of integer types

Return Value

array

integer types

string mapAliasToMysqlType(string $alias)

No description

Parameters

string $alias

Return Value

string

array getFloatTypes()

Returns an array of float types

Return Value

array

float types

array getIntegerRange(string $type, bool $signed = true)

Returns the min and max values of a given integer type

Parameters

string $type

integer type

bool $signed

whether signed

Return Value

array

min and max values