| 1 | <?php |
||
| 2 | namespace Kir\MySQL\Builder; |
||
| 3 | |||
| 4 | use Generator; |
||
| 5 | use IteratorAggregate; |
||
| 6 | use Kir\MySQL\Builder\Helpers\DBIgnoreRow; |
||
| 7 | use Kir\MySQL\Tools\AliasReplacer; |
||
| 8 | use Traversable; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @extends IteratorAggregate<int, array<string, mixed>> |
||
| 12 | */ |
||
| 13 | interface RunnableSelect extends Select, IteratorAggregate { |
||
| 14 | /** |
||
| 15 | * @return AliasReplacer |
||
| 16 | */ |
||
| 17 | public function aliasReplacer(): AliasReplacer; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array<string, mixed> $values |
||
| 21 | * @return $this |
||
| 22 | */ |
||
| 23 | public function bindValues(array $values); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $key |
||
| 27 | * @param string|int|bool|float|null $value |
||
| 28 | * @return $this |
||
| 29 | */ |
||
| 30 | public function bindValue(string $key, $value); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return $this |
||
| 34 | */ |
||
| 35 | public function clearValues(): self; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param bool $preserveTypes |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function setPreserveTypes(bool $preserveTypes = true): self; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Fetches all rows using PDO::FETCH_NUM |
||
| 45 | * |
||
| 46 | * @template K of int |
||
| 47 | * @template V |
||
| 48 | * @param null|callable(array<string, null|scalar>): (void|DBIgnoreRow|array<K, V>) $callback |
||
| 49 | * @return ($callback is null ? list<array<int, null|scalar>> : array<int, array<K, V>>) |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 50 | */ |
||
| 51 | public function fetchIndexedRows($callback = null): array; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @template K |
||
| 55 | * @template V |
||
| 56 | * @param null|callable(array<string, null|scalar>): (void|DBIgnoreRow|array<K, V>) $callback |
||
| 57 | * @return ($callback is null ? array<int, array<string, null|scalar>> : array<int, array<K, V>>) |
||
|
0 ignored issues
–
show
|
|||
| 58 | */ |
||
| 59 | public function fetchRows($callback = null): array; |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @template K |
||
| 63 | * @template V |
||
| 64 | * @param null|callable(array<string, null|scalar>): (void|DBIgnoreRow|array<K, V>) $callback |
||
| 65 | * @return ($callback is null ? Generator<int, array<string, null|scalar>> : Generator<int, array<K, V>>) |
||
|
0 ignored issues
–
show
|
|||
| 66 | */ |
||
| 67 | public function fetchRowsLazy($callback = null); |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @template K |
||
| 71 | * @template V |
||
| 72 | * @param null|callable(array<string, mixed>): (array<K, V>|void|DBIgnoreRow) $callback |
||
| 73 | * @return ($callback is null ? array<string, null|scalar> : array<K, V>) |
||
|
0 ignored issues
–
show
|
|||
| 74 | */ |
||
| 75 | public function fetchRow($callback = null): array; |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @template T |
||
| 79 | * @template U |
||
| 80 | * @param class-string<T> $className |
||
|
0 ignored issues
–
show
|
|||
| 81 | * @param null|callable(T): U $callback |
||
| 82 | * @return ($callback is null ? array<int, T> : array<int, U>) |
||
|
0 ignored issues
–
show
|
|||
| 83 | */ |
||
| 84 | public function fetchObjects(string $className = 'stdClass', $callback = null): array; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @template T |
||
| 88 | * @template U |
||
| 89 | * @param class-string<T> $className |
||
|
0 ignored issues
–
show
|
|||
| 90 | * @param null|callable(T): U $callback |
||
| 91 | * @return ($callback is null ? Generator<int, T> : Generator<int, U>) |
||
|
0 ignored issues
–
show
|
|||
| 92 | */ |
||
| 93 | public function fetchObjectsLazy($className = null, $callback = null); |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @template T |
||
| 97 | * @template U |
||
| 98 | * @param class-string<T> $className |
||
|
0 ignored issues
–
show
|
|||
| 99 | * @param null|callable(T): U $callback |
||
| 100 | * @return ($callback is null ? T : U) |
||
|
0 ignored issues
–
show
|
|||
| 101 | */ |
||
| 102 | public function fetchObject($className = null, $callback = null); |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @param bool $treatValueAsArray |
||
| 106 | * @return array<array-key, mixed> |
||
|
0 ignored issues
–
show
|
|||
| 107 | */ |
||
| 108 | public function fetchKeyValue($treatValueAsArray = false): array; |
||
| 109 | |||
| 110 | /** |
||
| 111 | * @param string[] $fields |
||
| 112 | * @return array<string, array<int, mixed>> |
||
| 113 | */ |
||
| 114 | public function fetchGroups(array $fields): array; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @template T |
||
| 118 | * @param null|callable(null|scalar): T $fn |
||
| 119 | * @return ($fn is null ? array<int, null|scalar> : array<int, T>) |
||
|
0 ignored issues
–
show
|
|||
| 120 | */ |
||
| 121 | public function fetchArray(?callable $fn = null): array; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @template TDefault |
||
| 125 | * @template TCastFn |
||
| 126 | * @param TDefault $default |
||
|
0 ignored issues
–
show
The type
Kir\MySQL\Builder\TDefault was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 127 | * @param null|callable(null|bool|string|int|float): TCastFn $fn |
||
| 128 | * @return ($fn is null ? null|scalar|TDefault : TCastFn) |
||
|
0 ignored issues
–
show
|
|||
| 129 | */ |
||
| 130 | public function fetchValue($default = null, ?callable $fn = null); |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @return int |
||
| 134 | */ |
||
| 135 | public function getFoundRows(): int; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * @return Traversable<int, array<string, mixed>> |
||
| 139 | */ |
||
| 140 | public function getIterator(): Traversable; |
||
| 141 | } |
||
| 142 |