|
|
|
|
@ -80,12 +80,12 @@ class OCIFunctionBuilder extends FunctionBuilder {
|
|
|
|
|
public function octetLength($field, $alias = ''): IQueryFunction {
|
|
|
|
|
$alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
|
|
|
|
|
$quotedName = $this->helper->quoteColumnName($field);
|
|
|
|
|
return new QueryFunction('LENGTHB(' . $quotedName . ')' . $alias);
|
|
|
|
|
return new QueryFunction('COALESCE(LENGTHB(' . $quotedName . '), 0)' . $alias);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function charLength($field, $alias = ''): IQueryFunction {
|
|
|
|
|
$alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
|
|
|
|
|
$quotedName = $this->helper->quoteColumnName($field);
|
|
|
|
|
return new QueryFunction('LENGTH(' . $quotedName . ')' . $alias);
|
|
|
|
|
return new QueryFunction('COALESCE(LENGTH(' . $quotedName . '), 0)' . $alias);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|