final class FieldMetadata (View source)

Handles fields Metadata

NOTE: Getters are not used in all implementations due to the important cost of getters calls

Constants

TYPE_GEOMETRY

TYPE_BIT

TYPE_JSON

TYPE_REAL

TYPE_INT

TYPE_BLOB

TYPE_UNKNOWN

TYPE_NULL

TYPE_STRING

TYPE_DATE

TYPE_TIME

TYPE_TIMESTAMP

TYPE_DATETIME

TYPE_YEAR

Properties

bool read-only $isMultipleKey
bool read-only $isPrimaryKey
bool read-only $isUniqueKey
bool read-only $isNotNull
bool read-only $isUnsigned
bool read-only $isZerofill
bool read-only $isNumeric
bool read-only $isBlob
bool read-only $isBinary
bool read-only $isEnum
bool read-only $isSet
bool read-only $isMappedTypeBit
bool read-only $isMappedTypeGeometry
bool read-only $isMappedTypeTimestamp
string $name

The column name

string $orgname

The original column name if an alias did exist

string $table

The table name

string $orgtable

The original table name

int read-only $charsetnr

The charset number

int read-only $decimals

The number of decimals used (for integer fields)

int read-only $length

The width of the field, as specified in the table definition.

string|null $internalMediaType

A field only used by the Results class

Methods

__construct(object $field)

No description

bool
isNotNull()

No description

bool
isNumeric()

No description

bool
isBinary()

No description

bool
isBlob()

No description

bool
isPrimaryKey()

No description

bool
isUniqueKey()

No description

bool
isMultipleKey()

No description

bool
isUnsigned()

No description

bool
isZerofill()

No description

bool
isEnum()

No description

bool
isSet()

No description

bool
isDateTimeType()

Checks that it is type DATE/TIME/DATETIME

bool
isTimeType()

Checks that it contains time A "DATE" field returns false for example

string
getMappedType()

Get the mapped type as a string

bool
isType(int $type)

Check if it is the mapped type

bool
isNotType(int $type)

Check if it is NOT the mapped type

Details

__construct(object $field)

No description

Parameters

object $field

bool isNotNull()

No description

Return Value

bool

bool isNumeric()

No description

Return Value

bool

bool isBinary()

No description

Return Value

bool

bool isBlob()

No description

Return Value

bool

bool isPrimaryKey()

No description

Return Value

bool

bool isUniqueKey()

No description

Return Value

bool

bool isMultipleKey()

No description

Return Value

bool

bool isUnsigned()

No description

Return Value

bool

bool isZerofill()

No description

Return Value

bool

bool isEnum()

No description

Return Value

bool

bool isSet()

No description

Return Value

bool

bool isDateTimeType()

Checks that it is type DATE/TIME/DATETIME

Return Value

bool

bool isTimeType()

Checks that it contains time A "DATE" field returns false for example

Return Value

bool

string getMappedType()

Get the mapped type as a string

Return Value

string

Empty when nothing could be matched

bool isType(int $type)

Check if it is the mapped type

Parameters

int $type

Return Value

bool

bool isNotType(int $type)

Check if it is NOT the mapped type

Parameters

int $type

Return Value

bool