Test/PHPUnit/Db/Metadata/Generic.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Test  
Subpackage
PHPUnit  
Version
$Id$  

\Zend_Test_PHPUnit_Db_Metadata_Generic

Package: Zend_Test\PHPUnit
Generic Metadata accessor for the Zend_Db adapters
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
 

Properties

>VPropertyprotected\Zend_Db_Adapter_Abstract $_connection
Zend_Db Connection
>VPropertyprotectedstring $_schema
Schemaname
Details
Type
string
>VPropertyprotectedarray $_tableMetadata = array()
Cached Table metadata
Default valuearray()Details
Type
array

Methods

methodpublic__construct( $db, string $schema) : void
final

Creates a new database meta data object using the given pdo connection and schema name.

Parameters
NameTypeDescription
$db
$schemastring
methodpublicallowsCascading() : bool

Returns true if the rdbms allows cascading

Returns
TypeDescription
bool
methodpublicdisablePrimaryKeys(string $tableName) : void

Disables primary keys if rdbms does not allow setting them otherwise

Parameters
NameTypeDescription
$tableNamestring
methodpublicenablePrimaryKeys(string $tableName) : void

Reenables primary keys after they have been disabled

Parameters
NameTypeDescription
$tableNamestring
methodpublicgetSchema() : string

Returns the name of the default schema.

Returns
TypeDescription
string
methodpublicgetTableColumns(string $tableName) : array

Returns an array containing the names of all the columns in the $tableName table,

Parameters
NameTypeDescription
$tableNamestring
Returns
TypeDescription
array
methodprotectedgetTableDescription(string $tableName) : array

Get Table information

Parameters
NameTypeDescription
$tableNamestring
Returns
TypeDescription
array
methodpublicgetTableNames() : array

List Tables

Returns
TypeDescription
array
methodpublicgetTablePrimaryKeys(string $tableName) : array

Returns an array containing the names of all the primary key columns in the $tableName table.

Parameters
NameTypeDescription
$tableNamestring
Returns
TypeDescription
array
methodpublicquoteSchemaObject(string $object) : string

Returns a quoted schema object. (table name, column name, etc)

Parameters
NameTypeDescription
$objectstring
Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .