Changes for beta10 (#5)
- Add In/InArray support - Add ORDER BY support for `Find` functions - Update dependencies - Implement fixes identified via static analysis Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -29,22 +29,21 @@ class Delete
|
||||
* Delete documents by matching a comparison on JSON fields
|
||||
*
|
||||
* @param string $tableName The table from which documents should be deleted
|
||||
* @param array|Field[] $fields The field comparison to match
|
||||
* @param Field[] $fields The field comparison to match
|
||||
* @param FieldMatch|null $match How to handle multiple conditions (optional; defaults to All)
|
||||
* @throws DocumentException If any is encountered
|
||||
*/
|
||||
public static function byFields(string $tableName, array $fields, ?FieldMatch $match = null): void
|
||||
{
|
||||
$namedFields = Parameters::nameFields($fields);
|
||||
Custom::nonQuery(Query\Delete::byFields($tableName, $namedFields, $match),
|
||||
Parameters::addFields($namedFields, []));
|
||||
Parameters::nameFields($fields);
|
||||
Custom::nonQuery(Query\Delete::byFields($tableName, $fields, $match), Parameters::addFields($fields, []));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete documents matching a JSON containment query (`@>`; PostgreSQL only)
|
||||
*
|
||||
* @param string $tableName The table from which documents should be deleted
|
||||
* @param array|object $criteria The JSON containment query values
|
||||
* @param mixed[]|object $criteria The JSON containment query values
|
||||
* @throws DocumentException If the database mode is not PostgreSQL, or if an error occurs
|
||||
*/
|
||||
public static function byContains(string $tableName, array|object $criteria): void
|
||||
|
||||
Reference in New Issue
Block a user