TableInfo Class Reference

Inherited by MSSQLTableInfo, MySQLTableInfo, OCI8TableInfo, PgSQLTableInfo, and SQLiteTableInfo.

List of all members.

Public Member Functions

Protected Member Functions

Protected Attributes


Member Function Documentation

TableInfo::__construct ( DatabaseInfo $database, $name )

 

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

array TableInfo::__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!).

TableInfo::__wakeup ( )

 

This "magic" method is invoked upon unserialize(). This method re-hydrates the object and restores the recursive hierarchy.

void TableInfo::initColumns ( ) [protected, pure virtual]

 

Loads the columns.
Returns void

Implemented in MSSQLTableInfo, MySQLTableInfo, OCI8TableInfo, PgSQLTableInfo, and SQLiteTableInfo.

void TableInfo::initPrimaryKey ( ) [protected, pure virtual]

 

Loads the primary key information for this table.
Returns void

Implemented in MSSQLTableInfo, MySQLTableInfo, OCI8TableInfo, PgSQLTableInfo, and SQLiteTableInfo.

void TableInfo::initForeignKeys ( ) [protected, pure virtual]

 

Loads the foreign keys for this table.
Returns void

Implemented in MSSQLTableInfo, MySQLTableInfo, OCI8TableInfo, PgSQLTableInfo, and SQLiteTableInfo.

void TableInfo::initIndexes ( ) [protected, pure virtual]

 

Loads the indexes information for this table.
Returns void

Implemented in MSSQLTableInfo, MySQLTableInfo, OCI8TableInfo, PgSQLTableInfo, and SQLiteTableInfo.

array TableInfo::getPrimaryKey ( )

 

Get parimary key in this table.
Exceptions
Exception - if foreign keys are unsupported by DB.

Returns array ForeignKeyInfo[]

ColumnInfo TableInfo::getColumn ( $name )

 

Get the ColumnInfo object for specified column.
Parameters
string $name The column name.

Returns ColumnInfo
Exceptions
SQLException - if column does not exist for this table.

array TableInfo::getColumns ( )

 

Get array of columns for this table.
Returns array ColumnInfo[]

ForeignKeyInfo TableInfo::getForeignKey ( $name )

 

Get specified fk for this table.
Parameters
string $name The foreign key name to retrieve.

Returns ForeignKeyInfo
Exceptions
SQLException - if fkey does not exist for this table.

array TableInfo::getForeignKeys ( )

 

Get all foreign keys.
Returns array ForeignKeyInfo[]

IndexInfo TableInfo::getIndex ( $name )

 

Gets the IndexInfo object for a specified index.
Parameters
string $name The index name to retrieve.

Returns IndexInfo
Exceptions
SQLException - if index does not exist for this table.

array TableInfo::getIndexes ( )

 

Get array of IndexInfo objects for this table.
Returns array IndexInfo[]

array TableInfo::getIndices ( )

 

Alias for getIndexes() method.
Returns array

string TableInfo::getName ( )

 

Get table name.
Returns string

string TableInfo::toString ( )

 

Returns string

TableInfo::foreignKeysLoaded ( )

 

Have foreign keys been loaded?

TableInfo::primaryKeyLoaded ( )

 

Has primary key info been loaded?

TableInfo::columnsLoaded ( )

 

Have columns been loaded?

TableInfo::indexesLoaded ( )

 

Has index information been loaded?

TableInfo::addColumn ( ColumnInfo $column )

 

Adds a column to this table.

TableInfo::getDatabase ( )

 

Get the parent DatabaseInfo object.


Member Data Documentation

TableInfo::$name [protected]

 

TableInfo::$columns = array() [protected]

 

TableInfo::$foreignKeys = array() [protected]

 

TableInfo::$indexes = array() [protected]

 

TableInfo::$primaryKey [protected]

 

TableInfo::$pkLoaded = false [protected]

 

TableInfo::$fksLoaded = false [protected]

 

TableInfo::$indexesLoaded = false [protected]

 

TableInfo::$colsLoaded = false [protected]

 

TableInfo::$conn [protected]

 

TableInfo::$database [protected]

 

TableInfo::$dblink [protected]

 

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

TableInfo::$dbname [protected]

 

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


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


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS