ColumnInfo Class Reference

List of all members.

Public Member Functions

Public Attributes


Constructor & Destructor Documentation

ColumnInfo::ColumnInfo ( &$  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.


Member Function Documentation

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!).

ColumnInfo::getName ()

 

Get column name.

Returns string

ColumnInfo::getType ()

 

Get column type.

Returns int

ColumnInfo::getNativeType ()

 

Gets the native type name.

Returns string

ColumnInfo::getSize ()

 

Get column size.

Returns 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

ColumnInfo::getDefaultValue ()

 

Get the default value.

Returns mixed

ColumnInfo::isNullable ()

 

Is column nullable?

Returns boolean

ColumnInfo::toString ()

 

Returns string

& 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[php4] library.


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS