PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TDbMetaData

TDbMetaData is the base class for retrieving metadata information, such as table and columns information, from a database connection.

Use the TDbMetaData::getTableInfo() method to retrieve a table information.

TComponent
Extended by TDbMetaData

Direct known subclasses

TMssqlMetaData, TMysqlMetaData, TOracleMetaData, TPgsqlMetaData, TSqliteMetaData
Abstract
Package: System\Data\Common
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Since: 3.1
Located at Data/Common/TDbMetaData.php
Methods summary
public
# __construct( TDbConnection $conn )

Parameters

$conn
TDbConnection
database connection.

Overrides

TComponent::__construct()
public TDbConnection
# getDbConnection( )

Returns

TDbConnection
database connection.
public static TDbMetaData
# getInstance( TDbConnection $conn )

Obtain database specific TDbMetaData class using the driver name of the database connection.

Obtain database specific TDbMetaData class using the driver name of the database connection.

Parameters

$conn
TDbConnection
database connection.

Returns

TDbMetaData
database specific TDbMetaData.
public TDbTableInfo
# getTableInfo( string $tableName = null )

Obtains table meta data information for the current connection and given table name.

Obtains table meta data information for the current connection and given table name.

Parameters

$tableName
string
table or view name

Returns

TDbTableInfo
table information.
public TDbCommandBuilder
# createCommandBuilder( string $tableName = null )

Creates a command builder for a given table name.

Creates a command builder for a given table name.

Parameters

$tableName
string
table name.

Returns

TDbCommandBuilder
command builder instance for the given table.
abstract protected TDbTableInfo
# createTableInfo( mixed $tableName )

This method should be implemented by decendent classes.

This method should be implemented by decendent classes.

Returns

TDbTableInfo
driver dependent create builder.
protected string
# getTableInfoClass( )

Returns

string
TDbTableInfo class name.
public string
# quoteTableName( string $name )

Quotes a table name for use in a query.

Quotes a table name for use in a query.

Parameters

$name
string
$name table name

Returns

string
the properly quoted table name
public string
# quoteColumnName( string $name )

Quotes a column name for use in a query.

Quotes a column name for use in a query.

Parameters

$name
string
$name column name

Returns

string
the properly quoted column name
public string
# quoteColumnAlias( string $name )

Quotes a column alias for use in a query.

Quotes a column alias for use in a query.

Parameters

$name
string
$name column alias

Returns

string
the properly quoted column alias
abstract public array
# findTableNames( string $schema = '' )

Returns all table names in the database. This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.

Returns all table names in the database. This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.

Parameters

$schema
string
$schema the schema of the tables. Defaults to empty string, meaning the current or default schema. If not empty, the returned table names will be prefixed with the schema name.

Returns

array
all table names in the database.
Methods inherited from TComponent
__call(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties summary
protected static array $delimiterIdentifier array('[', ']', '"', '`', "'")
#
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO