Constants

MONEY_COLUMN_TYPE_OID

MONEY_COLUMN_TYPE_OID

The internal PostgreSQL identifier of the money data type.

Properties

$moneyPrecision

$moneyPrecision : integer

Type

integer

$_name

$_name : 

Type

$_type

$_type : 

Type

$_null

$_null : 

Type

$_limit

$_limit : 

Type

$_precision

$_precision : 

Type

$_scale

$_scale : 

Type

$_unsigned

$_unsigned : 

Type

$_default

$_default : 

Type

$_sqlType

$_sqlType : 

Type

$_isText

$_isText : 

Type

$_isNumber

$_isNumber : 

Type

Methods

__construct()

__construct(string  $name, string  $default, string  $sqlType = null, boolean  $null = true) 

Construct

Parameters

string $name

The column's name, such as "supplier_id" in "supplier_id int(11)".

string $default

The type-casted default value, such as "new" in "sales_stage varchar(20) default 'new'".

string $sqlType

Used to extract the column's type, length and signed status, if necessary. For example "varchar" and "60" in "company_name varchar(60)" or "unsigned => true" in "int(10) UNSIGNED".

boolean $null

Whether this column allows NULL values.

isText()

isText() : boolean

Returns

boolean

isNumber()

isNumber() : boolean

Returns

boolean

typeCast()

typeCast(  $value) 

Casts value (which is a String) to an appropriate instance.

Parameters

$value

extractDefault()

extractDefault(  $default) 

Parameters

$default

getName()

getName() : string

Returns

string

getDefault()

getDefault() : string

Returns

string

getType()

getType() : string

Returns

string

getLimit()

getLimit() : integer

Returns

integer

precision()

precision() : integer

Returns

integer

scale()

scale() : integer

Returns

integer

isUnsigned()

isUnsigned() : boolean

Returns

boolean

isNull()

isNull() : boolean

Returns

boolean

getSqlType()

getSqlType() : string

Returns

string

binaryToString()

binaryToString(  $value) : string

Used to convert from BLOBs (BYTEAs) to Strings.

Parameters

$value

Returns

string

stringToDate()

stringToDate(string  $string) : \Horde_Date

Parameters

string $string

Returns

\Horde_Date

stringToTime()

stringToTime(string  $string) : \Horde_Date

Parameters

string $string

Returns

\Horde_Date

stringToDummyTime()

stringToDummyTime(  $value) : \Horde_Date

Parameters

$value

Returns

\Horde_Date

valueToBoolean()

valueToBoolean(mixed  $value) : boolean

Parameters

mixed $value

Returns

boolean

valueToDecimal()

valueToDecimal(mixed  $value) : \decimal

Parameters

mixed $value

Returns

\decimal

binaryToStringCallback()

binaryToStringCallback(  $matches) 

Callback function for binaryToString().

Parameters

$matches

_extractLimit()

_extractLimit(string  $sqlType) : integer

Parameters

string $sqlType

Returns

integer

_extractPrecision()

_extractPrecision(string  $sqlType) : integer

Parameters

string $sqlType

Returns

integer

_extractScale()

_extractScale(string  $sqlType) : integer

Parameters

string $sqlType

Returns

integer

_extractUnsigned()

_extractUnsigned(string  $sqlType) : integer

Parameters

string $sqlType

Returns

integer

_setSimplifiedType()

_setSimplifiedType() 

_extractValueFromDefault()

_extractValueFromDefault(  $default) 

Extracts the value from a PostgreSQL column default definition.

Parameters

$default