TableInfo Class Reference

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

List of all members.

Public Member Functions

Public Attributes


Constructor & Destructor Documentation

TableInfo::TableInfo ( &$  database,  $  name )

 

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


Member Function Documentation

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.

TableInfo::initColumns ()

 

Loads the columns.

Returns void

Reimplemented in MSSQLTableInfo, MySQLTableInfo, and PgSQLTableInfo.

TableInfo::initPrimaryKey ()

 

Loads the primary key information for this table.

Returns void

Reimplemented in MSSQLTableInfo, MySQLTableInfo, and PgSQLTableInfo.

TableInfo::initForeignKeys ()

 

Loads the foreign keys for this table.

Returns void

Reimplemented in MSSQLTableInfo, MySQLTableInfo, and PgSQLTableInfo.

TableInfo::initIndexes ()

 

Loads the indexes information for this table.

Returns void

Reimplemented in MSSQLTableInfo, MySQLTableInfo, and PgSQLTableInfo.

& TableInfo::getPrimaryKey ()

 

Get parimary key in this table.

Returns mixed array ForeignKeyInfo[] on success, SQLException - if foreign keys are unsupported by DB.

& TableInfo::getColumn ( $  name)

 

Get the ColumnInfo object for specified column.

Parameters:
string $name The column name.

Returns mixed ColumnInfo on success, SQLException if column does not exist for this table.

& TableInfo::getColumns ()

 

Get array of columns for this table.

Returns mixed array ColumnInfo[] on success, SQLException on failure.

& TableInfo::getForeignKey ( $  name)

 

Get specified fk for this table.

Parameters:
string $name The foreign key name to retrieve.

Returns mixed ForeignKeyInfo on success or SQLException - if fkey does not exist for this table.

& TableInfo::getForeignKeys ()

 

Get all foreign keys.

Returns mixed array ForeignKeyInfo[] on success, SQLException on failure.

& TableInfo::getIndex ( $  name)

 

Gets the IndexInfo object for a specified index.

Parameters:
string $name The index name to retrieve.

Returns mixed IndexInfo on success, SQLException - if index does not exist for this table.

& TableInfo::getIndexes ()

 

Get array of IndexInfo objects for this table.

Returns mixed array IndexInfo[] on success, SQLException on failure.

& TableInfo::getIndices ()

 

Alias for getIndexes() method.

Returns array

TableInfo::getName ()

 

Get table name.

Returns 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 ( &$  column)

 

Adds a column to this table.

& TableInfo::getDatabase ()

 

Get the parent DatabaseInfo object.


Member Data Documentation

TableInfo::$name

 

Reimplemented in OCI8TableInfo.

TableInfo::$columns = array()

 

TableInfo::$foreignKeys = array()

 

TableInfo::$indexes = array()

 

TableInfo::$primaryKey

 

TableInfo::$pkLoaded = false

 

TableInfo::$fksLoaded = false

 

TableInfo::$indexesLoaded = false

 

TableInfo::$colsLoaded = false

 

TableInfo::$conn

 

TableInfo::$database

 

TableInfo::$dblink

 

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

TableInfo::$dbname

 

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


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


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS