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


PHP Column::getTable方法代码示例

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


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

示例1: getRemoveColumnDDL

 /**
  * Builds the DDL SQL to remove a column
  *
  * @return     string
  */
 public function getRemoveColumnDDL(Column $column)
 {
     $pattern = "\nALTER TABLE %s DROP %s;\n";
     return sprintf($pattern, $this->quoteIdentifier($column->getTable()->getName()), $this->quoteIdentifier($column->getName()));
 }
开发者ID:rubensayshi,项目名称:propelsandbox,代码行数:10,代码来源:MysqlPlatform.php

示例2: getColumnFullIdentifier

 /**
  * Get the full quoted identifier including database/table name
  * @param Column $column
  * @return string
  */
 public function getColumnFullIdentifier(Column $column)
 {
     return "{$this->getTableFullIdentifier($column->getTable())}.{$this->getColumnBaseIdentifier($column)}";
 }
开发者ID:jamend,项目名称:selective-orm,代码行数:9,代码来源:Driver.php

示例3: getColumnDDL

 public function getColumnDDL(Column $col)
 {
     $domain = $col->getDomain();
     $ddl = array($this->quoteIdentifier($col->getName()));
     $sqlType = $domain->getSqlType();
     $table = $col->getTable();
     if ($col->isAutoIncrement() && $table && $table->getIdMethodParameters() == null) {
         $sqlType = $col->getType() === PropelTypes::BIGINT ? 'bigserial' : 'serial';
     }
     if ($this->hasSize($sqlType) && $col->isDefaultSqlType($this)) {
         $ddl[] = $sqlType . $domain->printSize();
     } else {
         $ddl[] = $sqlType;
     }
     if ($default = $this->getColumnDefaultValueDDL($col)) {
         $ddl[] = $default;
     }
     if ($notNull = $this->getNullString($col->isNotNull())) {
         $ddl[] = $notNull;
     }
     if ($autoIncrement = $col->getAutoIncrementString()) {
         $ddl[] = $autoIncrement;
     }
     return implode(' ', $ddl);
 }
开发者ID:kalaspuffar,项目名称:php-orm-benchmark,代码行数:25,代码来源:PgsqlPlatform.php

示例4: getRuleMessage

 /**
  * Gets the message for a specified rule.
  *
  * @param      Column $column
  * @param      string $type
  * @param      mixed $value
  */
 protected function getRuleMessage(Column $column, $type, $value)
 {
     // create message
     $colName = $column->getName();
     $tableName = $column->getTable()->getName();
     $msg = self::$validatorMessages[strtolower($type)];
     $tmp = compact($msg['var']);
     array_unshift($tmp, $msg['msg']);
     $msg = call_user_func_array('sprintf', $tmp);
     return $msg;
 }
开发者ID:RafalFilipek,项目名称:Propel2,代码行数:18,代码来源:PropelSchemaReverseTask.php

示例5: getAddColumnDDLBits

 public function getAddColumnDDLBits(Column $column)
 {
     $pattern = "ADD %s %s";
     $tableColumns = $column->getTable()->getColumns();
     //default to add to top if the before-column cannot be found
     $insertPositionDDL = "FIRST";
     foreach ($tableColumns as $i => $tableColumn) {
         //we found the column, use the column before it, if its not the first
         if ($tableColumn->getName() == $column->getName()) {
             //we have a column that is not the first column
             if ($i > 0) {
                 $insertPositionDDL = "AFTER " . $this->quoteIdentifier($tableColumns[$i - 1]->getName());
             }
             break;
         }
     }
     return sprintf($pattern, $this->getColumnDDL($column), $insertPositionDDL);
 }
开发者ID:kcornejo,项目名称:estadistica,代码行数:18,代码来源:MysqlPlatform.php

示例6: getAddColumnDDL

 /**
  * Builds the DDL SQL to remove a column
  *
  * @return string
  */
 public function getAddColumnDDL(Column $column)
 {
     $pattern = "\r\nALTER TABLE %s ADD %s;\r\n";
     return sprintf($pattern, $this->quoteIdentifier($column->getTable()->getName()), $this->getColumnDDL($column));
 }
开发者ID:kcornejo,项目名称:estadistica,代码行数:10,代码来源:DefaultPlatform.php


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