class Types

Class holding type definitions for MySQL and MariaDB.

Methods

__construct(DatabaseInterface $dbi)

Constructor

string[]
getUnaryOperators()

Returns list of unary operators.

boolean
isUnaryOperator(string $op)

Check whether operator is unary.

string[]
getNullOperators()

Returns list of operators checking for NULL.

string[]
getEnumOperators()

ENUM search operators

string[]
getTextOperators()

TEXT search operators

string[]
getNumberOperators()

Number search operators

string[]
getTypeOperators(string $type, boolean $null)

Returns operators for given type

string
getTypeOperatorsHtml(string $type, boolean $null, string $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.

string[]
getFunctionsClass(string $class)

Returns array of functions available for a class.

string[]
getFunctions(string $type)

Returns array of functions available for a type.

string[]
getAllFunctions()

Returns array of all functions available.

string[]
getAttributes()

Returns array of all attributes available.

string[]
getColumns()

Returns array of all column types available.

string[]
getIntegerTypes()

Returns an array of integer types

string[]
getIntegerRange(string $type, boolean $signed = true)

Returns the min and max values of a given integer type

Details

at line 30
__construct(DatabaseInterface $dbi)

Constructor

Parameters

DatabaseInterface $dbi Database interface instance

at line 40
string[] getUnaryOperators()

Returns list of unary operators.

Return Value

string[]

at line 57
boolean isUnaryOperator(string $op)

Check whether operator is unary.

Parameters

string $op operator name

Return Value

boolean

at line 67
string[] getNullOperators()

Returns list of operators checking for NULL.

Return Value

string[]

at line 80
string[] getEnumOperators()

ENUM search operators

Return Value

string[]

at line 93
string[] getTextOperators()

TEXT search operators

Return Value

string[]

at line 118
string[] getNumberOperators()

Number search operators

Return Value

string[]

at line 145
string[] getTypeOperators(string $type, boolean $null)

Returns operators for given type

Parameters

string $type Type of field
boolean $null Whether field can be NULL

Return Value

string[]

at line 174
string getTypeOperatorsHtml(string $type, boolean $null, string $selectedOperator = null)

Returns operators for given type as html options

Parameters

string $type Type of field
boolean $null Whether field can be NULL
string $selectedOperator Option to be selected

Return Value

string Generated Html

at line 200
string getTypeDescription(string $type)

Returns the data type description.

Parameters

string $type The data type to get a description.

Return Value

string

at line 408
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

at line 474
string[] getFunctionsClass(string $class)

Returns array of functions available for a class.

Parameters

string $class The class to get function list.

Return Value

string[]

at line 662
string[] getFunctions(string $type)

Returns array of functions available for a type.

Parameters

string $type The data type to get function list.

Return Value

string[]

at line 674
string[] getAllFunctions()

Returns array of all functions available.

Return Value

string[]

at line 692
string[] getAttributes()

Returns array of all attributes available.

Return Value

string[]

at line 712
string[] getColumns()

Returns array of all column types available.

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

Return Value

string[]

at line 799
string[] getIntegerTypes()

Returns an array of integer types

Return Value

string[] integer types

at line 818
string[] getIntegerRange(string $type, boolean $signed = true)

Returns the min and max values of a given integer type

Parameters

string $type integer type
boolean $signed whether signed

Return Value

string[] min and max values