← All changes
|
vendor/wpfluent/framework/src/WPFluent/Database/ConnectionInterface.php
+14
-6
1.35
→
2.1.0
View file →
| @@ -27,22 +27,31 @@ | ||
| 27 | 27 | * Run a select statement and return a single result. |
| 28 | 28 | * |
| 29 | 29 | * @param string $query |
| 30 | 30 | * @param array $bindings |
| 31 | - * @param bool $useReadPdo | |
| 32 | 31 | * @return mixed |
| 33 | 32 | */ |
| 34 | - public function selectOne($query, $bindings = [], $useReadPdo = true); | |
| 33 | + public function selectOne($query, $bindings = []); | |
| 35 | 34 | |
| 36 | 35 | /** |
| 36 | + * Run a select statement and return the first column of the first row. | |
| 37 | + * | |
| 38 | + * @param string $query | |
| 39 | + * @param array $bindings | |
| 40 | + * @return mixed | |
| 41 | + * | |
| 42 | + * @throws \FluentBoards\Framework\Database\MultipleColumnsSelectedException | |
| 43 | + */ | |
| 44 | + public function scalar($query, $bindings = []); | |
| 45 | + | |
| 46 | + /** | |
| 37 | 47 | * Run a select statement against the database. |
| 38 | 48 | * |
| 39 | 49 | * @param string $query |
| 40 | 50 | * @param array $bindings |
| 41 | - * @param bool $useReadPdo | |
| 42 | 51 | * @return array |
| 43 | 52 | */ |
| 44 | - public function select($query, $bindings = [], $useReadPdo = true); | |
| 53 | + public function select($query, $bindings = []); | |
| 45 | 54 | |
| 46 | 55 | /** |
| 47 | 56 | * Run a select statement against the database and returns a generator. |
| 48 | 57 | * |
| @@ -47,12 +56,11 @@ | ||
| 47 | 56 | * Run a select statement against the database and returns a generator. |
| 48 | 57 | * |
| 49 | 58 | * @param string $query |
| 50 | 59 | * @param array $bindings |
| 51 | - * @param bool $useReadPdo | |
| 52 | 60 | * @return \Generator |
| 53 | 61 | */ |
| 54 | - public function cursor($query, $bindings = [], $useReadPdo = true); | |
| 62 | + public function cursor($query, $bindings = []); | |
| 55 | 63 | |
| 56 | 64 | /** |
| 57 | 65 | * Run an insert statement against the database. |
| 58 | 66 | * |