Completed
Pull Request — develop (#6)
by Martin
06:50 queued 04:07
created

JsonbSet::customiseFunction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;
4
5
/**
6
 * Implementation of PostgreSql JSONB_SET()
7
 * @see https://www.postgresql.org/docs/9.6/static/functions-array.html
8
 *
9
 * @since 0.10
10
 * @author Martin Georgiev <[email protected]>
11
 */
12
class JsonbSet extends AbstractFunction
13
{
14
    protected function customiseFunction()
15
    {
16
        $this->setFunctionPrototype('jsonb_set(%s, %s, %s)');
17
        $this->addLiteralMapping('StringPrimary');
18
        $this->addLiteralMapping('InputParameter');
19
        $this->addLiteralMapping('InputParameter');
20
    }
21
}
22