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

JsonbSet   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A customiseFunction() 0 7 1
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