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


PHP Index::getQuotedColumns方法代码示例

本文整理汇总了PHP中Doctrine\DBAL\Schema\Index::getQuotedColumns方法的典型用法代码示例。如果您正苦于以下问题:PHP Index::getQuotedColumns方法的具体用法?PHP Index::getQuotedColumns怎么用?PHP Index::getQuotedColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\DBAL\Schema\Index的用法示例。


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

示例1: getSql

 public function getSql(Index $index, $table)
 {
     if ($table instanceof Table) {
         $table = $table->getQuotedName($this->platform);
     }
     $name = $index->getQuotedName($this->platform);
     $columns = $index->getQuotedColumns($this->platform);
     if (count($columns) == 0) {
         throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
     }
     if ($index->isPrimary()) {
         return $this->platform->getCreatePrimaryKeySQL($index, $table);
     }
     $query = 'CREATE INDEX ' . $name . ' ON ' . $table;
     $query .= ' USING gist(' . $this->platform->getIndexFieldDeclarationListSQL($columns) . ')';
     return $query;
 }
开发者ID:novikovsergey,项目名称:doctrine-postgis,代码行数:17,代码来源:SpatialIndexSqlGenerator.php

示例2: _appendUniqueConstraintDefinition

 /**
  * Extend unique key constraint with required filters
  *
  * @param string                      $sql
  * @param \Doctrine\DBAL\Schema\Index $index
  *
  * @return string
  */
 private function _appendUniqueConstraintDefinition($sql, Index $index)
 {
     $fields = array();
     foreach ($index->getQuotedColumns($this) as $field) {
         $fields[] = $field . ' IS NOT NULL';
     }
     return $sql . ' WHERE ' . implode(' AND ', $fields);
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:16,代码来源:SQLServerPlatform.php

示例3: getIndexDeclarationSQL

 /**
  * Obtains DBMS specific SQL code portion needed to set an index
  * declaration to be used in statements like CREATE TABLE.
  *
  * @param string                       $name  The name of the index.
  * @param \Doctrine\DBAL\Schema\Index  $index The index definition.
  *
  * @return string DBMS specific SQL code portion needed to set an index.
  *
  * @throws \InvalidArgumentException
  */
 public function getIndexDeclarationSQL($name, Index $index)
 {
     $columns = $index->getQuotedColumns($this);
     if (count($columns) === 0) {
         throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
     }
     return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' (' . $this->getIndexFieldDeclarationListSQL($columns) . ')' . $this->getPartialIndexSQL($index);
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:19,代码来源:AbstractPlatform.php

示例4: getCreatePrimaryKeySQL

 public function getCreatePrimaryKeySQL(Index $index, $table)
 {
     if ($table instanceof Table) {
         $table = $table->getQuotedName($this);
     }
     return 'ALTER TABLE ' . $this->espoQuote($table) . ' ADD PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
 }
开发者ID:disearth,项目名称:espocrm,代码行数:7,代码来源:MySqlPlatform.php

示例5: getIndexDeclarationSQL

 /**
  * Generate table index column declaration
  * @codeCoverageIgnore
  */
 public function getIndexDeclarationSQL($name, Index $index)
 {
     $columns = $index->getQuotedColumns($this);
     $name = new Identifier($name);
     if (count($columns) == 0) {
         throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
     }
     return 'INDEX ' . $name->getQuotedName($this) . ' USING FULLTEXT (' . $this->getIndexFieldDeclarationListSQL($columns) . ')';
 }
开发者ID:crate,项目名称:crate-dbal,代码行数:13,代码来源:CratePlatform.php

示例6: getCreatePrimaryKeySQL

 /**
  * Returns the SQL to create an unnamed primary key constraint.
  *
  * @param \Doctrine\DBAL\Schema\Index        $index
  * @param \Doctrine\DBAL\Schema\Table|string $table
  *
  * @return string
  */
 public function getCreatePrimaryKeySQL(Index $index, $table)
 {
     return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
 }
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:12,代码来源:AbstractPlatform.php

示例7: getCreatePrimaryKeySQL

 /**
  * {@inheritDoc}
  */
 public function getCreatePrimaryKeySQL(Index $index, $table)
 {
     $sql = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
     if ($index->getName()) {
         $sql .= ' CONSTRAINT ' . $index->getQuotedName($this);
     }
     return $sql;
 }
开发者ID:josemalonsom,项目名称:ifx4dd,代码行数:11,代码来源:InformixPlatform.php


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