当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPUnit_Extensions_Database_DataSet_ITableMetaData类代码示例

本文整理汇总了PHP中PHPUnit_Extensions_Database_DataSet_ITableMetaData的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_DataSet_ITableMetaData类的具体用法?PHP PHPUnit_Extensions_Database_DataSet_ITableMetaData怎么用?PHP PHPUnit_Extensions_Database_DataSet_ITableMetaData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PHPUnit_Extensions_Database_DataSet_ITableMetaData类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: disablePrimaryKeys

 protected function disablePrimaryKeys(PHPUnit_Extensions_Database_DataSet_ITableMetaData $databaseTableMetaData, PHPUnit_Extensions_Database_DataSet_ITable $table, PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection)
 {
     if (count($databaseTableMetaData->getPrimaryKeys())) {
         return TRUE;
     }
     return FALSE;
 }
开发者ID:AndyDune,项目名称:rzn.phpunit4,代码行数:7,代码来源:Insert.php

示例2: matches

 /**
  * Asserts that the given tableMetaData matches this tableMetaData.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITableMetaData $other
  */
 public function matches(PHPUnit_Extensions_Database_DataSet_ITableMetaData $other)
 {
     if ($this->getTableName() != $other->getTableName() || $this->getColumns() != $other->getColumns()) {
         return FALSE;
     }
     return TRUE;
 }
开发者ID:nathanedwards,项目名称:cowfields.craft,代码行数:12,代码来源:AbstractTableMetaData.php

示例3: buildOperationArguments

 protected function buildOperationArguments(PHPUnit_Extensions_Database_DataSet_ITableMetaData $databaseTableMetaData, PHPUnit_Extensions_Database_DataSet_ITable $table, $row)
 {
     $args = array();
     foreach ($databaseTableMetaData->getPrimaryKeys() as $columnName) {
         $args[] = $table->getValue($row, $columnName);
     }
     return $args;
 }
开发者ID:DaveNascimento,项目名称:civicrm-packages,代码行数:8,代码来源:Delete.php

示例4: buildTableSelect

 /**
  * Creates the query necessary to pull all of the data from a table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData
  * @return unknown
  */
 public static function buildTableSelect(PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData, PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection = NULL)
 {
     if ($tableMetaData->getTableName() == '') {
         $e = new Exception("Empty Table Name");
         echo $e->getTraceAsString();
         throw $e;
     }
     $columns = $tableMetaData->getColumns();
     if ($databaseConnection) {
         $columns = array_map(array($databaseConnection, 'quoteSchemaObject'), $columns);
     }
     $columnList = implode(', ', $columns);
     if ($databaseConnection) {
         $tableName = $databaseConnection->quoteSchemaObject($tableMetaData->getTableName());
     } else {
         $tableName = $tableMetaData->getTableName();
     }
     $primaryKeys = $tableMetaData->getPrimaryKeys();
     if ($databaseConnection) {
         $primaryKeys = array_map(array($databaseConnection, 'quoteSchemaObject'), $primaryKeys);
     }
     if (count($primaryKeys)) {
         $orderBy = 'ORDER BY ' . implode(' ASC, ', $primaryKeys) . ' ASC';
     } else {
         $orderBy = '';
     }
     return "SELECT {$columnList} FROM {$tableName} {$orderBy}";
 }
开发者ID:pdkhuong,项目名称:BBG,代码行数:34,代码来源:DataSet.php

示例5: assertEquals

 /**
  * Asserts that the given tableMetaData matches this tableMetaData.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITableMetaData $other
  */
 public function assertEquals(PHPUnit_Extensions_Database_DataSet_ITableMetaData $other)
 {
     if ($this->getTableName() != $other->getTableName()) {
         throw new Exception("Expected table name of {$this->getTableName()}, has a name of {$other->getTableName()}");
     }
     if ($this->getColumns() != $other->getColumns()) {
         throw new Exception("Expected following columns: " . implode(', ', $this->getColumns()) . "; has columns: " . implode(', ', $other->getColumns()));
     }
     return TRUE;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:15,代码来源:AbstractTableMetaData.php

示例6: matches

 public function matches(\PHPUnit_Extensions_Database_DataSet_ITableMetaData $other)
 {
     return $this->getTableName() == $other->getTableName();
 }
开发者ID:seytar,项目名称:psx,代码行数:4,代码来源:TableMetaData.php

示例7: buildTableSelect

 /**
  * Creates the query necessary to pull all of the data from a table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData
  * @return unknown
  */
 public static function buildTableSelect(PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData)
 {
     if ($tableMetaData->getTableName() == '') {
         $e = new Exception("Empty Table Name");
         echo $e->getTraceAsString();
         throw $e;
     }
     $columnList = implode(', ', $tableMetaData->getColumns());
     $primaryKeys = $tableMetaData->getPrimaryKeys();
     if (count($primaryKeys)) {
         $orderBy = 'ORDER BY ' . implode(' ASC, ', $primaryKeys) . ' ASC';
     } else {
         $orderBy = '';
     }
     return "SELECT {$columnList} FROM {$tableMetaData->getTableName()} {$orderBy}";
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:22,代码来源:DataSet.php

示例8: getTableName

 /**
  * Returns the name of the table.
  *
  * @return string
  */
 public function getTableName()
 {
     return $this->originalMetaData->getTableName();
 }
开发者ID:cjmi,项目名称:miniblog,代码行数:9,代码来源:TableMetaDataFilter.php


注:本文中的PHPUnit_Extensions_Database_DataSet_ITableMetaData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。