PHP Method Schema::columnSql, someline-starter Code Examples

This page contains top rated real world PHP examples of method Schema::columnSql from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: mysqlschema.php Project: Edo78/fluidframe
0
 /**
  * Return the proper SQL for creating or
  * altering a column.
  *
  * Appropriate for use in CREATE TABLE or
  * ALTER TABLE statements.
  *
  * @param ColumnDef $cd column to create
  *
  * @return string correct SQL for that column
  */
 function columnSql(array $cd)
 {
     $line = array();
     $line[] = parent::columnSql($cd);
     // This'll have been added from our transform of 'serial' type
     if (!empty($cd['auto_increment'])) {
         $line[] = 'auto_increment';
     }
     if (!empty($cd['description'])) {
         $line[] = 'comment';
         $line[] = $this->quoteValue($cd['description']);
     }
     return implode(' ', $line);
 }
Example #2
Show file File: pgsqlschema.php Project: bashrc/gnusocial-debian
0
 /**
  * Return the proper SQL for creating or
  * altering a column.
  *
  * Appropriate for use in CREATE TABLE or
  * ALTER TABLE statements.
  *
  * @param array $cd column to create
  *
  * @return string correct SQL for that column
  */
 function columnSql(array $cd)
 {
     $line = array();
     $line[] = parent::columnSql($cd);
     /*
     if ($table['foreign keys'][$name]) {
         foreach ($table['foreign keys'][$name] as $foreignTable => $foreignColumn) {
             $line[] = 'references';
             $line[] = $this->quoteIdentifier($foreignTable);
             $line[] = '(' . $this->quoteIdentifier($foreignColumn) . ')';
         }
     }
     */
     return implode(' ', $line);
 }