當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Connection::getSupplementalDriver方法代碼示例

本文整理匯總了PHP中Connection::getSupplementalDriver方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connection::getSupplementalDriver方法的具體用法?PHP Connection::getSupplementalDriver怎麽用?PHP Connection::getSupplementalDriver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Connection的用法示例。


在下文中一共展示了Connection::getSupplementalDriver方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tryDelimite

    protected function tryDelimite($s)
    {
        $driver = $this->connection->getSupplementalDriver();
        return preg_replace_callback('#(?<=[^\\w`"\\[]|^)[a-z_][a-z0-9_]*(?=[^\\w`"(\\]]|$)#i', create_function('$m', 'extract(NCFix::$vars[' . NCFix::uses(array('driver' => $driver)) . '], EXTR_REFS);
			return strtoupper($m[0]) === $m[0] ? $m[0] : $driver->delimite($m[0]);
		'), $s);
    }
開發者ID:riskatlas,項目名稱:micka,代碼行數:7,代碼來源:SqlBuilder.php

示例2: reloadForeignKeys

    protected function reloadForeignKeys($table)
    {
        foreach ($this->connection->getSupplementalDriver()->getForeignKeys($table) as $row) {
            $this->structure['belongsTo'][strtolower($table)][$row['local']] = $row['table'];
            $this->structure['hasMany'][strtolower($row['table'])][$row['local'] . $table] = array($row['local'], $table);
        }
        if (isset($this->structure['belongsTo'][$table])) {
            uksort($this->structure['belongsTo'][$table], create_function('$a, $b', '
				return strlen($a) - strlen($b);
			'));
        }
    }
開發者ID:riskatlas,項目名稱:micka,代碼行數:12,代碼來源:DiscoveredReflection.php

示例3: getPrimarySequence

 /**
  * @return string
  */
 public function getPrimarySequence()
 {
     if ($this->primarySequence === FALSE) {
         $this->primarySequence = NULL;
         $driver = $this->connection->getSupplementalDriver();
         if ($driver->isSupported(ISupplementalDriver::SUPPORT_SEQUENCE)) {
             foreach ($driver->getColumns($this->name) as $column) {
                 if ($column['name'] === $this->primary) {
                     $this->primarySequence = $column['vendor']['sequence'];
                     break;
                 }
             }
         }
     }
     return $this->primarySequence;
 }
開發者ID:riskatlas,項目名稱:micka,代碼行數:19,代碼來源:Selection.php

示例4: detectColumnTypes

 private function detectColumnTypes()
 {
     if ($this->types === NULL) {
         $this->types = array();
         if ($this->connection->getSupplementalDriver()->isSupported(ISupplementalDriver::SUPPORT_COLUMNS_META)) {
             // workaround for PHP bugs #53782, #54695
             $col = 0;
             while ($meta = $this->getColumnMeta($col++)) {
                 if (isset($meta['native_type'])) {
                     $this->types[$meta['name']] = DatabaseHelpers::detectType($meta['native_type']);
                 }
             }
         }
     }
     return $this->types;
 }
開發者ID:riskatlas,項目名稱:micka,代碼行數:16,代碼來源:Statement.php

示例5: __construct

 public function __construct(Connection $connection)
 {
     $this->connection = $connection;
     $this->driver = $connection->getSupplementalDriver();
 }
開發者ID:riskatlas,項目名稱:micka,代碼行數:5,代碼來源:SqlPreprocessor.php


注:本文中的Connection::getSupplementalDriver方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。