PHP 클래스 PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection, qcodo

저자: Mike Lively ([email protected])
상속: implements PHPUnit_Extensions_Database_DB_IDatabaseConnection
파일 보기 프로젝트 열기: qcodo/qcodo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$connection PDO
$metaData PHPUnit_Extensions_Database_DB_IMetaData The metadata object used to retrieve table meta data from the database.

공개 메소드들

메소드 설명
__construct ( PDO $connection, string $schema = '' ) Creates a new database connection
allowsCascading ( ) : boolean Returns true if the connection allows cascading
close ( ) Close this connection.
createDataSet ( array $tableNames = NULL ) : PHPUnit_Extensions_Database_DataSet_IDataSet Creates a dataset containing the specified table names. If no table names are specified then it will created a dataset over the entire database.
createQueryTable ( string $resultName, string $sql ) : PHPUnit_Extensions_Database_DB_Table Creates a table with the result of the specified SQL statement.
getConfig ( ) : PHPUnit_Extensions_Database_Database_DatabaseConfig Returns this connection database configuration
getConnection ( ) : PDO Returns a PDO Connection
getMetaData ( ) : PHPUnit_Extensions_Database_DB_IMetaData Returns a database metadata object that can be used to retrieve table meta data from the database.
getRowCount ( string $tableName, string $whereClause = NULL ) Returns the number of rows in the given table. You can specify an optional where clause to return a subset of the table.
getSchema ( ) : string Returns the schema for the connection.
getTruncateCommand ( ) : string Returns the command used to truncate a table.
quoteSchemaObject ( string $object ) : string Returns a quoted schema object. (table name, column name, etc)

메소드 상세

__construct() 공개 메소드

Creates a new database connection
public __construct ( PDO $connection, string $schema = '' )
$connection PDO
$schema string - The name of the database schema you will be testing against.

allowsCascading() 공개 메소드

Returns true if the connection allows cascading
public allowsCascading ( ) : boolean
리턴 boolean

close() 공개 메소드

Close this connection.
public close ( )

createDataSet() 공개 메소드

Creates a dataset containing the specified table names. If no table names are specified then it will created a dataset over the entire database.
public createDataSet ( array $tableNames = NULL ) : PHPUnit_Extensions_Database_DataSet_IDataSet
$tableNames array
리턴 PHPUnit_Extensions_Database_DataSet_IDataSet

createQueryTable() 공개 메소드

Creates a table with the result of the specified SQL statement.
public createQueryTable ( string $resultName, string $sql ) : PHPUnit_Extensions_Database_DB_Table
$resultName string
$sql string
리턴 PHPUnit_Extensions_Database_DB_Table

getConfig() 공개 메소드

Returns this connection database configuration
public getConfig ( ) : PHPUnit_Extensions_Database_Database_DatabaseConfig
리턴 PHPUnit_Extensions_Database_Database_DatabaseConfig

getConnection() 공개 메소드

Returns a PDO Connection
public getConnection ( ) : PDO
리턴 PDO

getMetaData() 공개 메소드

Returns a database metadata object that can be used to retrieve table meta data from the database.
public getMetaData ( ) : PHPUnit_Extensions_Database_DB_IMetaData
리턴 PHPUnit_Extensions_Database_DB_IMetaData

getRowCount() 공개 메소드

Returns the number of rows in the given table. You can specify an optional where clause to return a subset of the table.
public getRowCount ( string $tableName, string $whereClause = NULL )
$tableName string
$whereClause string

getSchema() 공개 메소드

Returns the schema for the connection.
public getSchema ( ) : string
리턴 string

getTruncateCommand() 공개 메소드

Returns the command used to truncate a table.
public getTruncateCommand ( ) : string
리턴 string

quoteSchemaObject() 공개 메소드

Returns a quoted schema object. (table name, column name, etc)
public quoteSchemaObject ( string $object ) : string
$object string
리턴 string

프로퍼티 상세

$connection 보호되어 있는 프로퍼티

protected PDO $connection
리턴 PDO

$metaData 보호되어 있는 프로퍼티

The metadata object used to retrieve table meta data from the database.
protected PHPUnit_Extensions_Database_DB_IMetaData $metaData
리턴 PHPUnit_Extensions_Database_DB_IMetaData