1 | <?php |
||
10 | class OracleBuilder extends Builder |
||
11 | { |
||
12 | /** |
||
13 | * The database query grammar instance. |
||
14 | * |
||
15 | * @var OracleGrammar |
||
16 | */ |
||
17 | protected $grammar; |
||
18 | |||
19 | /** |
||
20 | * The database query post processor instance. |
||
21 | * |
||
22 | * @var OracleProcessor |
||
23 | */ |
||
24 | protected $processor; |
||
25 | |||
26 | /** |
||
27 | * @param ConnectionInterface $connection |
||
28 | * @param OracleGrammar $grammar |
||
29 | * @param OracleProcessor $processor |
||
30 | */ |
||
31 | public function __construct( |
||
32 | ConnectionInterface $connection, |
||
33 | OracleGrammar $grammar, |
||
34 | OracleProcessor $processor |
||
35 | ) { |
||
36 | parent::__construct($connection, $grammar, $processor); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Insert a new record and get the value of the primary key. |
||
41 | * |
||
42 | * @param array $values |
||
43 | * @param array $binaries |
||
44 | * @param string $sequence |
||
45 | * @return int |
||
46 | */ |
||
47 | public function insertLob(array $values, array $binaries, $sequence = 'id') |
||
48 | { |
||
49 | $sql = $this->grammar->compileInsertLob($this, $values, $binaries, $sequence); |
||
50 | |||
51 | $values = $this->cleanBindings($values); |
||
52 | $binaries = $this->cleanBindings($binaries); |
||
53 | |||
54 | return $this->processor->saveLob($this, $sql, $values, $binaries); |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Update a new record with blob field. |
||
59 | * |
||
60 | * @param array $values |
||
61 | * @param array $binaries |
||
62 | * @param string $sequence |
||
63 | * @return boolean |
||
64 | */ |
||
65 | public function updateLob(array $values, array $binaries, $sequence = 'id') |
||
66 | { |
||
67 | $bindings = array_values(array_merge($values, $this->getBindings())); |
||
68 | |||
69 | $sql = $this->grammar->compileUpdateLob($this, $values, $binaries, $sequence); |
||
70 | |||
71 | $values = $this->cleanBindings($bindings); |
||
72 | $binaries = $this->cleanBindings($binaries); |
||
73 | |||
74 | return $this->processor->saveLob($this, $sql, $values, $binaries); |
||
75 | } |
||
76 | |||
77 | /** |
||
78 | * Add a "where in" clause to the query. |
||
79 | * Split one WHERE IN clause into multiple clauses each |
||
80 | * with up to 1000 expressions to avoid ORA-01795 |
||
81 | * |
||
82 | * @param string $column |
||
83 | * @param mixed $values |
||
84 | * @param string $boolean |
||
85 | * @param bool $not |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function whereIn($column, $values, $boolean = 'and', $not = false) |
||
108 | |||
109 | /** |
||
110 | * Run the query as a "select" statement against the connection. |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function runSelect() |
||
126 | } |
||
127 |