/** * 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; } }
/** * 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()); }