lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php 1 location
|
@@ 147-154 (lines=8) @@
|
| 144 |
|
* @param mixed $type One of IQueryBuilder::PARAM_* |
| 145 |
|
* @return IQueryFunction |
| 146 |
|
*/ |
| 147 |
|
public function castColumn($column, $type) { |
| 148 |
|
if ($type === IQueryBuilder::PARAM_STR) { |
| 149 |
|
$column = $this->helper->quoteColumnName($column); |
| 150 |
|
return new QueryFunction('to_char(' . $column . ')'); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
return parent::castColumn($column, $type); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
/** |
| 157 |
|
* @inheritdoc |
lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php 1 location
|
@@ 39-46 (lines=8) @@
|
| 36 |
|
* @param mixed $type One of IQueryBuilder::PARAM_* |
| 37 |
|
* @return string |
| 38 |
|
*/ |
| 39 |
|
public function castColumn($column, $type) { |
| 40 |
|
if ($type === IQueryBuilder::PARAM_INT) { |
| 41 |
|
$column = $this->helper->quoteColumnName($column); |
| 42 |
|
return new QueryFunction('CAST(' . $column . ' AS INT)'); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
return parent::castColumn($column, $type); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
/** |
| 49 |
|
* @inheritdoc |