AbstractDataType

AbstractYes

Base class for all data types that contains properties common to all data types.

Internal

Table of Contents

Properties

$fixed  : bool
Differentiate between CHAR/VARCHAR and BINARY/VARBINARY
$length  : int
Used by most field types for length/precision information
$options  : array<string|int, mixed>
Extra options for a column that control specific features/flags
$precision  : int
Used for floating point type columns. -1 is used to indicate no value has been set.
$scale  : int
Used for floating point type columns. -1 is used to indicate that no value has been set.
$unsigned  : bool
Unsigned flag for numeric columns
$values  : array<string|int, mixed>
Options for ENUM/SET data types

Methods

getLength()  : int
getOptions()  : array<string|int, mixed>
getPrecision()  : int
getScale()  : int
getValues()  : array<string|int, mixed>
isFixed()  : bool
isUnsigned()  : bool
setFixed()  : void
setLength()  : void
setOptions()  : void
setPrecision()  : void
setScale()  : void
setUnsigned()  : void
setValues()  : void

Properties

$fixed

Differentiate between CHAR/VARCHAR and BINARY/VARBINARY

protected bool $fixed = false

$length

Used by most field types for length/precision information

protected int $length = 0

$options

Extra options for a column that control specific features/flags

protected array<string|int, mixed> $options = []

$precision

Used for floating point type columns. -1 is used to indicate no value has been set.

protected int $precision = -1

$scale

Used for floating point type columns. -1 is used to indicate that no value has been set.

protected int $scale = -1

$unsigned

Unsigned flag for numeric columns

protected bool $unsigned = false

$values

Options for ENUM/SET data types

protected array<string|int, mixed> $values = []

Methods

getLength()

public getLength() : int
Return values
int

getOptions()

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPrecision()

public getPrecision() : int
Return values
int

getScale()

public getScale() : int
Return values
int

getValues()

public getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

isFixed()

public isFixed() : bool
Return values
bool

isUnsigned()

public isUnsigned() : bool
Return values
bool

setFixed()

public setFixed(bool $fixed) : void
Parameters
$fixed : bool

setLength()

public setLength(int $length) : void
Parameters
$length : int

setOptions()

public setOptions(array<string|int, mixed> $options) : void
Parameters
$options : array<string|int, mixed>

setPrecision()

public setPrecision(int $precision) : void
Parameters
$precision : int

setScale()

public setScale(int $scale) : void
Parameters
$scale : int

setUnsigned()

public setUnsigned(bool $unsigned) : void
Parameters
$unsigned : bool

setValues()

public setValues(array<string|int, mixed> $values) : void
Parameters
$values : array<string|int, mixed>

        
On this page

Search results