PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.10.0
Fluent Support – Helpdesk & Customer Support Ticket System v1.10.0
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / vendor / wpfluent / framework / src / WPFluent / Database / ConnectionInterface.php

ConnectionInterface.php in Fluent Support – Helpdesk & Customer Support Ticket System 1.10.0, at vendor/wpfluent/framework/src/WPFluent/Database/ConnectionInterface.php

171 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentSupport\Framework\Database;
4
5 use Closure;
6
7 interface ConnectionInterface
8 {
9 /**
10 * Begin a fluent query against a database table.
11 *
12 * @param \Closure|\FluentSupport\Framework\Database\Query\Builder|string $table
13 * @param string|null $as
14 * @return \FluentSupport\Framework\Database\Query\Builder
15 */
16 public function table($table, $as = null);
17
18 /**
19 * Get a new raw query expression.
20 *
21 * @param mixed $value
22 * @return \FluentSupport\Framework\Database\Query\Expression
23 */
24 public function raw($value);
25
26 /**
27 * Run a select statement and return a single result.
28 *
29 * @param string $query
30 * @param array $bindings
31 * @param bool $useReadPdo
32 * @return mixed
33 */
34 public function selectOne($query, $bindings = [], $useReadPdo = true);
35
36 /**
37 * Run a select statement against the database.
38 *
39 * @param string $query
40 * @param array $bindings
41 * @param bool $useReadPdo
42 * @return array
43 */
44 public function select($query, $bindings = [], $useReadPdo = true);
45
46 /**
47 * Run a select statement against the database and returns a generator.
48 *
49 * @param string $query
50 * @param array $bindings
51 * @param bool $useReadPdo
52 * @return \Generator
53 */
54 public function cursor($query, $bindings = [], $useReadPdo = true);
55
56 /**
57 * Run an insert statement against the database.
58 *
59 * @param string $query
60 * @param array $bindings
61 * @return bool
62 */
63 public function insert($query, $bindings = []);
64
65 /**
66 * Run an update statement against the database.
67 *
68 * @param string $query
69 * @param array $bindings
70 * @return int
71 */
72 public function update($query, $bindings = []);
73
74 /**
75 * Run a delete statement against the database.
76 *
77 * @param string $query
78 * @param array $bindings
79 * @return int
80 */
81 public function delete($query, $bindings = []);
82
83 /**
84 * Execute an SQL statement and return the boolean result.
85 *
86 * @param string $query
87 * @param array $bindings
88 * @return bool
89 */
90 public function statement($query, $bindings = []);
91
92 /**
93 * Run an SQL statement and get the number of rows affected.
94 *
95 * @param string $query
96 * @param array $bindings
97 * @return int
98 */
99 public function affectingStatement($query, $bindings = []);
100
101 /**
102 * Run a raw, unprepared query against the PDO connection.
103 *
104 * @param string $query
105 * @return bool
106 */
107 public function unprepared($query);
108
109 /**
110 * Prepare the query bindings for execution.
111 *
112 * @param array $bindings
113 * @return array
114 */
115 public function prepareBindings(array $bindings);
116
117 /**
118 * Execute a Closure within a transaction.
119 *
120 * @param \Closure $callback
121 * @param int $attempts
122 * @return mixed
123 *
124 * @throws \Throwable
125 */
126 public function transaction(Closure $callback, $attempts = 1);
127
128 /**
129 * Start a new database transaction.
130 *
131 * @return void
132 */
133 public function beginTransaction();
134
135 /**
136 * Commit the active database transaction.
137 *
138 * @return void
139 */
140 public function commit();
141
142 /**
143 * Rollback the active database transaction.
144 *
145 * @return void
146 */
147 public function rollBack();
148
149 /**
150 * Get the number of active transactions.
151 *
152 * @return int
153 */
154 public function transactionLevel();
155
156 /**
157 * Execute the given callback in "dry run" mode.
158 *
159 * @param \Closure $callback
160 * @return array
161 */
162 public function pretend(Closure $callback);
163
164 /**
165 * Get the name of the connected database.
166 *
167 * @return string
168 */
169 public function getDatabaseName();
170 }
171