Esempio n. 1
0
 /**
  * Get the SQL expression representing a value for a column
  * @param Column $column
  * @return string
  */
 public function getColumnSQLExpression(Column $column)
 {
     switch ($column->getType()) {
         case 'date':
         case 'datetime':
         case 'timestamp':
             return "UNIX_TIMESTAMP({$column->getFullIdentifier()}) AS {$column->getName()}";
             break;
         case 'set':
             return "{$column->getFullIdentifier()} + 0 AS {$column->getName()}";
             break;
         default:
             return $column->getFullIdentifier();
             break;
     }
 }
Esempio n. 2
0
 /**
  * Get the SQL expression representing a value for a column
  * @param Column $column
  * @return string
  */
 public function getColumnSQLExpression(Column $column)
 {
     return $this->getSQLExpressionForType($column->getFullIdentifier(), $column->getType(), $column->getName());
 }