Final Class Yiisoft\Db\Mssql\Builder\LengthBuilder
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Builds SQL LEN() function expressions for {@see Length} objects.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| build() | Builds a SQL LEN() function expression from the given {@see Length} object. |
Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $queryBuilder | \ |
|
public function __construct(private readonly QueryBuilderInterface $queryBuilder) {}
Builds a SQL LEN() function expression from the given {@see Length} object.
| public string build ( \ | ||
| $expression | \ |
The expression to build. |
| $params | array |
The parameters to be bound to the query. |
| return | string |
The SQL |
|---|---|---|
public function build(ExpressionInterface $expression, array &$params = []): string
{
return 'LEN(' . $this->buildOperand($expression->operand, $params) . ')';
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.