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

Class: TableInfo

Source Location: /creole/metadata/TableInfo.php

Class Overview


Represents a table.


Author(s):

Version:

  • $Revision: 1.11 $

Variables

Methods


Child classes:

MSSQLTableInfo
MSSQL implementation of TableInfo.
MySQLTableInfo
MySQL implementation of TableInfo.
ODBCTableInfo
ODBC implementation of TableInfo.
OCI8TableInfo
Oracle (OCI8) implementation of TableInfo.
PgSQLTableInfo
PgSQL implementation of TableInfo.
SQLiteTableInfo
MySQL implementation of TableInfo.

Class Details

[line 30]
Represents a table.



Tags:

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


[ Top ]


Class Variables

$colsLoaded =  false

[line 46]



Tags:

access:  protected

Type:   mixed


[ Top ]

$columns = array()

[line 38]



Tags:

access:  protected

Type:   mixed


[ Top ]

$conn =

[line 52]

Database Connection.



Tags:

access:  protected

Type:   Connection


[ Top ]

$database =

[line 58]

The parent DatabaseInfo object.



Tags:

access:  protected

Type:   DatabaseInfo


[ Top ]

$dblink =

[line 61]

Shortcut to db resource link id (needed by drivers for queries).



Tags:

access:  protected

Type:   mixed


[ Top ]

$dbname =

[line 64]

Shortcut to db name (needed by many drivers for queries).



Tags:

access:  protected

Type:   mixed


[ Top ]

$fksLoaded =  false

[line 44]



Tags:

access:  protected

Type:   mixed


[ Top ]

$foreignKeys = array()

[line 39]



Tags:

access:  protected

Type:   mixed


[ Top ]

$indexes = array()

[line 40]



Tags:

access:  protected

Type:   mixed


[ Top ]

$indexesLoaded =  false

[line 45]



Tags:

access:  protected

Type:   mixed


[ Top ]

$name =

[line 37]



Tags:

access:  protected

Type:   mixed


[ Top ]

$pkLoaded =  false

[line 43]



Tags:

access:  protected

Type:   mixed


[ Top ]

$primaryKey =

[line 41]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 71]

TableInfo __construct( DatabaseInfo $database, mixed $name, string $table, resource $dblink)



Overridden in child classes as:

OCI8TableInfo::__construct()

Parameters:

string   $table   The table name.
string   $database   The database name.
resource   $dblink   The db connection resource.

[ Top ]

method addColumn [line 264]

void addColumn( ColumnInfo $column)

Adds a column to this table.



Tags:

access:  public


[ Top ]

method columnsLoaded [line 252]

void columnsLoaded( )

Have columns been loaded?



Tags:

access:  public


[ Top ]

method foreignKeysLoaded [line 240]

void foreignKeysLoaded( )

Have foreign keys been loaded?



Tags:

access:  public


[ Top ]

method getColumn [line 144]

ColumnInfo getColumn( string $name)

Get the ColumnInfo object for specified column.



Tags:

access:  public
throws:  SQLException - if column does not exist for this table.


Parameters:

string   $name   The column name.

[ Top ]

method getColumns [line 157]

array getColumns( )

Get array of columns for this table.



Tags:

return:  ColumnInfo[]
access:  public


[ Top ]

method getDatabase [line 270]

void getDatabase( )

Get the parent DatabaseInfo object.



Tags:

access:  public


[ Top ]

method getForeignKey [line 169]

ForeignKeyInfo getForeignKey( string $name)

Get specified fk for this table.



Tags:

access:  public
throws:  SQLException - if fkey does not exist for this table.


Parameters:

string   $name   The foreign key name to retrieve.

[ Top ]

method getForeignKeys [line 182]

array getForeignKeys( )

Get all foreign keys.



Tags:

return:  ForeignKeyInfo[]
access:  public


[ Top ]

method getIndex [line 194]

IndexInfo getIndex( string $name)

Gets the IndexInfo object for a specified index.



Tags:

access:  public
throws:  SQLException - if index does not exist for this table.


Parameters:

string   $name   The index name to retrieve.

[ Top ]

method getIndexes [line 207]

array getIndexes( )

Get array of IndexInfo objects for this table.



Tags:

return:  IndexInfo[]
access:  public


[ Top ]

method getIndices [line 217]

array getIndices( )

Alias for getIndexes() method.



Tags:

access:  public


[ Top ]

method getName [line 226]

string getName( )

Get table name.



Tags:

access:  public


[ Top ]

method getPrimaryKey [line 132]

array getPrimaryKey( )

Get parimary key in this table.



Tags:

return:  ForeignKeyInfo[]
access:  public
throws:  Exception - if foreign keys are unsupported by DB.


[ Top ]

method indexesLoaded [line 258]

void indexesLoaded( )

Has index information been loaded?



Tags:

access:  public


[ Top ]

method initColumns [line 106]

void initColumns( )

Loads the columns.



Tags:

access:  protected
abstract:  


Overridden in child classes as:

MSSQLTableInfo::initColumns()
Loads the columns for this table.
MySQLTableInfo::initColumns()
Loads the columns for this table.
ODBCTableInfo::initColumns()
OCI8TableInfo::initColumns()
Loads the columns for this table.
PgSQLTableInfo::initColumns()
Load the columns for this table
SQLiteTableInfo::initColumns()
Loads the columns for this table.

[ Top ]

method initForeignKeys [line 118]

void initForeignKeys( )

Loads the foreign keys for this table.



Tags:

access:  protected
abstract:  


Overridden in child classes as:

MSSQLTableInfo::initForeignKeys()
Loads the foreign keys for this table.
MySQLTableInfo::initForeignKeys()
Load foreign keys (unsupported in MySQL).
ODBCTableInfo::initForeignKeys()
OCI8TableInfo::initForeignKeys()
Load foreign keys
PgSQLTableInfo::initForeignKeys()
Load foreign keys for this table.
SQLiteTableInfo::initForeignKeys()
Load foreign keys (unsupported in SQLite).

[ Top ]

method initIndexes [line 124]

void initIndexes( )

Loads the indexes information for this table.



Tags:

access:  protected
abstract:  


Overridden in child classes as:

MSSQLTableInfo::initIndexes()
Loads the indexes for this table.
MySQLTableInfo::initIndexes()
Loads the indexes for this table.
ODBCTableInfo::initIndexes()
OCI8TableInfo::initIndexes()
Loads the indexes for this table.
PgSQLTableInfo::initIndexes()
Load indexes for this table
SQLiteTableInfo::initIndexes()
Loads the indexes for this table.

[ Top ]

method initPrimaryKey [line 112]

void initPrimaryKey( )

Loads the primary key information for this table.



Tags:

access:  protected
abstract:  


Overridden in child classes as:

MSSQLTableInfo::initPrimaryKey()
Loads the primary key info for this table.
MySQLTableInfo::initPrimaryKey()
Loads the primary key information for this table.
ODBCTableInfo::initPrimaryKey()
OCI8TableInfo::initPrimaryKey()
Loads the primary key information for this table.
PgSQLTableInfo::initPrimaryKey()
Loads the primary keys for this table.
SQLiteTableInfo::initPrimaryKey()
Loads the primary key information for this table.

[ Top ]

method primaryKeyLoaded [line 246]

void primaryKeyLoaded( )

Has primary key info been loaded?



Tags:

access:  public


[ Top ]

method toString [line 234]

string toString( )



Tags:

access:  public


[ Top ]

method __sleep [line 85]

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 ]

method __wakeup [line 94]

void __wakeup( )

This "magic" method is invoked upon unserialize().

This method re-hydrates the object and restores the recursive hierarchy.




[ Top ]


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