Final Class Yiisoft\Db\Oracle\Builder\LikeBuilder
| Inheritance | Yiisoft\ |
|---|
Build an object of {@see Like} into SQL expressions for Oracle Server.
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $escapingReplacements | array | \ is initialized in {@see buildLike()} method since there is a need to choose replacement value
based on {@see Quoter::quoteValue()}. |
Yiisoft\ |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| prepareColumn() | Yiisoft\ |
|
| preparePlaceholderName() | Yiisoft\ |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| ESCAPE_SQL | " ESCAPE '!'" | Yiisoft\ |
Property Details
Method Details
| public mixed __construct ( \ | ||
| $queryBuilder | \ |
|
public function __construct(
private readonly QueryBuilderInterface $queryBuilder,
) {
parent::__construct($queryBuilder);
/**
* Different pdo_oci8 versions may or may not implement `PDO::quote()`, so {@see Quoter::quoteValue()} may or
* may not quote `\`.
*/
$this->escapingReplacements['\\'] = substr($this->queryBuilder->getQuoter()->quoteValue('\\'), 1, -1);
}
| protected string prepareColumn ( \ | ||
| $condition | \ |
|
| $params | array | |
protected function prepareColumn(Like|NotLike $condition, array &$params): string
{
$column = parent::prepareColumn($condition, $params);
if ($condition->caseSensitive === false) {
$column = 'LOWER(' . $column . ')';
}
return $column;
}
| protected string preparePlaceholderName ( string|\ | ||
| $value | string|\ |
|
| $condition | \ |
|
| $params | array | |
protected function preparePlaceholderName(
string|Stringable|int|ExpressionInterface $value,
Like|NotLike $condition,
array &$params,
): string {
$placeholderName = parent::preparePlaceholderName($value, $condition, $params);
if ($condition->caseSensitive === false) {
$placeholderName = 'LOWER(' . $placeholderName . ')';
}
return $placeholderName;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.