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:
@@ -18,7 +18,7 @@ class RemoveFields
|
||||
*
|
||||
* @param string $tableName The table in which the document should have fields removed
|
||||
* @param mixed $docId The ID of the document from which fields should be removed
|
||||
* @param array|string[] $fieldNames The names of the fields to be removed
|
||||
* @param string[] $fieldNames The names of the fields to be removed
|
||||
* @throws DocumentException If any is encountered
|
||||
*/
|
||||
public static function byId(string $tableName, mixed $docId, array $fieldNames): void
|
||||
@@ -32,8 +32,8 @@ class RemoveFields
|
||||
* Remove fields from documents via a comparison on a JSON field in the document
|
||||
*
|
||||
* @param string $tableName The table in which documents should have fields removed
|
||||
* @param array|Field[] $fields The field comparison to match
|
||||
* @param array|string[] $fieldNames The names of the fields to be removed
|
||||
* @param Field[] $fields The field comparison to match
|
||||
* @param string[] $fieldNames The names of the fields to be removed
|
||||
* @param FieldMatch|null $match How to handle multiple conditions (optional; defaults to All)
|
||||
* @throws DocumentException If any is encountered
|
||||
*/
|
||||
@@ -41,17 +41,17 @@ class RemoveFields
|
||||
?FieldMatch $match = null): void
|
||||
{
|
||||
$nameParams = Parameters::fieldNames(':name', $fieldNames);
|
||||
$namedFields = Parameters::nameFields($fields);
|
||||
Custom::nonQuery(Query\RemoveFields::byFields($tableName, $namedFields, $nameParams, $match),
|
||||
Parameters::addFields($namedFields, $nameParams));
|
||||
Parameters::nameFields($fields);
|
||||
Custom::nonQuery(Query\RemoveFields::byFields($tableName, $fields, $nameParams, $match),
|
||||
Parameters::addFields($fields, $nameParams));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove fields from documents via a JSON containment query (`@>`; PostgreSQL only)
|
||||
*
|
||||
* @param string $tableName The table in which documents should have fields removed
|
||||
* @param array|object $criteria The JSON containment query values
|
||||
* @param array|string[] $fieldNames The names of the fields to be removed
|
||||
* @param mixed[]|object $criteria The JSON containment query values
|
||||
* @param string[] $fieldNames The names of the fields to be removed
|
||||
* @throws DocumentException If the database mode is not PostgreSQL, or if an error occurs
|
||||
*/
|
||||
public static function byContains(string $tableName, array|object $criteria, array $fieldNames): void
|
||||
@@ -66,7 +66,7 @@ class RemoveFields
|
||||
*
|
||||
* @param string $tableName The table in which documents should have fields removed
|
||||
* @param string $path The JSON Path match string
|
||||
* @param array|string[] $fieldNames The names of the fields to be removed
|
||||
* @param string[] $fieldNames The names of the fields to be removed
|
||||
* @throws DocumentException If the database mode is not PostgreSQL, or if an error occurs
|
||||
*/
|
||||
public static function byJsonPath(string $tableName, string $path, array $fieldNames): void
|
||||
|
||||
Reference in New Issue
Block a user