@@ -31,6 +31,7 @@ public function inTransaction(): bool;
3131 *
3232 * @param string|array $query SQL query as a string, with ? as variable placeholders if necessary
3333 * or an array for a structured SQL query where $vars is not used
34+ * @psalm-param string|array{fields?:array,field?:string,tables?:array,table?:string,where?:array,group?:array,order?:array,limit?:int,offset?:int,lock?:bool} $query
3435 * @param array $vars Query variables, replaces ? with these variables in order
3536 * @return DBSelectQueryInterface Query result to use with fetch, fetchAll, clear
3637 *
@@ -62,6 +63,7 @@ public function clear(DBSelectQueryInterface $selectQuery): void;
6263 *
6364 * @param string|array $query SQL query as a string, with ? as variable placeholders if necessary
6465 * or an array for a structured SQL query where $vars is not used
66+ * @psalm-param string|array{fields?:array,field?:string,tables?:array,table?:string,where?:array,group?:array,order?:array,lock?:bool} $query
6567 * @param array $vars Query variables, replaces ? with these variables in order
6668 * @return array|null Table row as an associative array, or null if no entry was found
6769 *
@@ -74,6 +76,7 @@ public function fetchOne($query, array $vars = []): ?array;
7476 *
7577 * @param string|array $query SQL query as a string, with ? as variable placeholders if necessary
7678 * or an array for a structured SQL query where $vars is not used
79+ * @psalm-param string|array{fields?:array,field?:string,tables?:array,table?:string,where?:array,group?:array,order?:array,limit?:int,offset?:int,lock?:bool,flattenFields?:bool} $query
7780 * @param array $vars Query variables, replaces ? with these variables in order
7881 * @return array List of table rows, each entry as an associate array for one row
7982 *
@@ -85,7 +88,7 @@ public function fetchAll($query, array $vars = []): array;
8588 * Insert a row into a table with the given names and values
8689 *
8790 * @param string $tableName Name of the table
88- * @param array $row Name and value pairs to insert into the table
91+ * @param array<string, mixed> $row Name and value pairs to insert into the table
8992 * @param string $autoIncrementIndex Index of an automatically generated value that should be returned
9093 * @return string|null If $autoIncrementIndex is empty, return null, otherwise return the auto increment value
9194 *
@@ -104,7 +107,7 @@ public function insert(string $tableName, array $row = [], string $autoIncrement
104107 * Others/ANSI: MERGE (see https://en.wikipedia.org/wiki/Merge_(SQL))
105108 *
106109 * @param string $tableName Name of the table
107- * @param array $row Row to insert, keys are column names, values are the data
110+ * @param array<string, mixed> $row Row to insert, keys are column names, values are the data
108111 * @param string[] $indexColumns Index columns which encompass the unique index
109112 * @param array|null $rowUpdates Fields to update if entry already exists, default is all non-index field entries
110113 *
@@ -116,6 +119,7 @@ public function insertOrUpdate(string $tableName, array $row = [], array $indexC
116119 * Execute an update query and return number of affected rows
117120 *
118121 * @param array $query Structured query parts
122+ * @psalm-param array{changes?:array,tables?:array,table?:string,where?:array,order?:array,limit?:int} $query
119123 * @return int Number of affected rows
120124 *
121125 * @throws DBException Common minimal exception thrown if anything goes wrong
0 commit comments