@@ -35,7 +35,6 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * Run a query (prepare & execute). |
| 37 | 37 | * @param string $sql SQL query |
| 38 | - * @param array $data parameters (optional) |
|
| 39 | 38 | * @return ResultInterface the result of the execution |
| 40 | 39 | */ |
| 41 | 40 | public function query(string $sql, $par = null) : ResultInterface |
@@ -50,6 +49,13 @@ discard block |
||
| 50 | 49 | { |
| 51 | 50 | return $this->connection['name']; |
| 52 | 51 | } |
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * @param string $key |
|
| 55 | + * @param string $default |
|
| 56 | + * |
|
| 57 | + * @return string |
|
| 58 | + */ |
|
| 53 | 59 | public function option($key, $default = null) |
| 54 | 60 | { |
| 55 | 61 | return isset($this->connection['opts'][$key]) ? $this->connection['opts'][$key] : $default; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | public function begin() : bool |
| 77 | 77 | { |
| 78 | - return $this->transaction = true; |
|
| 78 | + return $this->transaction = true; |
|
| 79 | 79 | } |
| 80 | 80 | public function commit() : bool |
| 81 | 81 | { |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | } |
| 200 | 200 | return $new; |
| 201 | 201 | }) |
| 202 | - as $relation |
|
| 202 | + as $relation |
|
| 203 | 203 | ) { |
| 204 | 204 | $relations[$relation['CONSTRAINT_NAME']]['table'] = $relation['TABLE_NAME']; |
| 205 | 205 | $relations[$relation['CONSTRAINT_NAME']]['keymap'][$primary[(int)$relation['POSITION']-1]] = $relation['COLUMN_NAME']; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | parse_str($temp[1], $connection['opts']); |
| 23 | 23 | $connection['name'] = $temp[0]; |
| 24 | 24 | if (!is_file($connection['name']) && is_file('/'.$connection['name'])) { |
| 25 | - $connection['name'] = '/'.$connection['name']; |
|
| 25 | + $connection['name'] = '/'.$connection['name']; |
|
| 26 | 26 | } |
| 27 | 27 | $this->connection = $connection; |
| 28 | 28 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * Create an instance |
| 62 | 62 | * @param DBInterface $db the database connection |
| 63 | - * @param Table|string $table the name or definition of the main table in the query |
|
| 63 | + * @param Table $table the name or definition of the main table in the query |
|
| 64 | 64 | */ |
| 65 | 65 | public function __construct(DBInterface $db, $table) |
| 66 | 66 | { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | /** |
| 241 | 241 | * Group by a column (or columns) |
| 242 | - * @param string|array $column the column name (or names) to group by |
|
| 242 | + * @param string $column the column name (or names) to group by |
|
| 243 | 243 | * @return $this |
| 244 | 244 | */ |
| 245 | 245 | public function group($column) : TableQuery |