Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use LENGTHC function on oracle for length query function
  • Loading branch information
tomneedham authored and butonic committed Aug 7, 2017
commit 6d087b5b0d9c8afd934f7b6467ca82e92edfb5ac
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,13 @@ public function iLike($x, $y, $type = null) {
$y = $this->helper->quoteColumnName($y);
return new QueryFunction('REGEXP_LIKE('.$x.', \'^\' || REPLACE('.$y.', \'%\', \'.*\') || \'$\', \'i\')');
}

/**
* Use LENGTHC on Oracle to return multi-byte safe number of characters not bytes.
* @inheritdoc
*/
public function length($column) {
$column = $this->helper->quoteColumnName($column);
return new QueryFunction("LENGTHC({$column})");
}
}