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 |
lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php 1 location
|
@@ 169-176 (lines=8) @@
|
| 166 |
|
* @param mixed $type One of IQueryBuilder::PARAM_* |
| 167 |
|
* @return IQueryFunction |
| 168 |
|
*/ |
| 169 |
|
public function castColumn($column, $type) { |
| 170 |
|
if ($type === IQueryBuilder::PARAM_STR) { |
| 171 |
|
$column = $this->helper->quoteColumnName($column); |
| 172 |
|
return new QueryFunction('to_char(' . $column . ')'); |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
return parent::castColumn($column, $type); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
/** |
| 179 |
|
* @inheritdoc |