ColumnInfo Class Reference

List of all members.

Public Member Functions

Public Attributes


Member Function Documentation

ColumnInfo::__construct ( TableInfo $table, $name, $type = null, $nativeType = null, $size = null, $scale = null, $is_nullable = null, $default = null )

 

Construct a new ColumnInfo object.

Parameters
TableInfo $table The table that owns this column.
string $name Column name.
int $type Creole type.
string $nativeType Native type name.
int $size Column length.
int $scale Column scale (number of digits after decimal).
boolean $is_nullable Whether col is nullable.
mixed $default Default value.

array ColumnInfo::__sleep ( )

 

This "magic" method is invoked upon serialize(). Because the Info class hierarchy is recursive, we must handle the serialization and unserialization of this object.
Returns array The class variables that should be serialized (all must be public!).

string ColumnInfo::getName ( )

 

Get column name.
Returns string

int ColumnInfo::getType ( )

 

Get column type.
Returns int

string ColumnInfo::getNativeType ( )

 

Gets the native type name.
Returns string

int ColumnInfo::getSize ( )

 

Get column size.
Returns int

int ColumnInfo::getScale ( )

 

Get column scale. Scale refers to number of digits after the decimal. Sometimes this is referred to as precision, but precision is the total number of digits (i.e. length).
Returns int

mixed ColumnInfo::getDefaultValue ( )

 

Get the default value.
Returns mixed

boolean ColumnInfo::isNullable ( )

 

Is column nullable?
Returns boolean

string ColumnInfo::toString ( )

 

Returns string

TableInfo ColumnInfo::getTable ( )

 

Get parent table.
Returns TableInfo


Member Data Documentation

ColumnInfo::$name

 

Column name

ColumnInfo::$type

 

Column Creole type.

ColumnInfo::$nativeType

 

Column native type

ColumnInfo::$size

 

Column length

ColumnInfo::$scale

 

Column scale (number of digits after decimal )

ColumnInfo::$isNullable

 

Is nullable?

ColumnInfo::$defaultValue

 

Default value

ColumnInfo::$table

 

Table


This file is part of the Creole[php5] library.


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS