creole.metadata
[ class tree: creole.metadata ] [ index: creole.metadata ] [ all elements ]

Class: ColumnInfo

Source Location: /creole/metadata/ColumnInfo.php

Class Overview


Represents a Column.


Author(s):

Version:

  • $Revision: 1.10 $

Variables

Methods



Class Details

[line 30]
Represents a Column.



Tags:

version:  $Revision: 1.10 $
author:  Hans Lellelid <hans@xmpl.org>


[ Top ]


Class Variables

$defaultValue =

[line 56]

Default value



Tags:

access:  public

Type:   mixed


[ Top ]

$isNullable =

[line 53]

Is nullable?



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 38]

Column name



Tags:

access:  public

Type:   mixed


[ Top ]

$nativeType =

[line 44]

Column native type



Tags:

access:  public

Type:   mixed


[ Top ]

$scale =

[line 50]

Column scale (number of digits after decimal )



Tags:

access:  public

Type:   mixed


[ Top ]

$size =

[line 47]

Column length



Tags:

access:  public

Type:   mixed


[ Top ]

$table =

[line 59]

Table



Tags:

access:  public

Type:   mixed


[ Top ]

$type =

[line 41]

Column Creole type.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 73]

ColumnInfo __construct( TableInfo $table, string $name, [int $type = null], [string $nativeType = null], [int $size = null], [int $scale = null], [boolean $is_nullable = null], [mixed $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.

[ Top ]

method getDefaultValue [line 147]

mixed getDefaultValue( )

Get the default value.



Tags:

access:  public


[ Top ]

method getName [line 100]

string getName( )

Get column name.



Tags:

access:  public


[ Top ]

method getNativeType [line 118]

string getNativeType( )

Gets the native type name.



Tags:

access:  public


[ Top ]

method getScale [line 138]

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




Tags:

access:  public


[ Top ]

method getSize [line 127]

int getSize( )

Get column size.



Tags:

access:  public


[ Top ]

method getTable [line 173]

TableInfo getTable( )

Get parent table.



Tags:

access:  public


[ Top ]

method getType [line 109]

int getType( )

Get column type.



Tags:

access:  public


[ Top ]

method isNullable [line 156]

boolean isNullable( )

Is column nullable?



Tags:

access:  public


[ Top ]

method toString [line 164]

string toString( )



Tags:

access:  public


[ Top ]

method __sleep [line 91]

array __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.




Tags:

return:  The class variables that should be serialized (all must be public!).


[ Top ]


Documentation generated on Mon, 23 Aug 2004 21:51:15 -0400 by phpDocumentor 1.3.0RC3