This pull request adds a comprehensive set of query tests to the Blitz ORM project. The tests cover a wide range of query features and scenarios to ensure the correct functioning of the query engine.
Description
The changes in this pull request include:
Adding new test cases for retrieving all attributes of an entity using the $fields parameter.
Adding tests for retrieving a subset of attributes using the $fields parameter.
Adding tests for retrieving an entity by its unique identifier using the $id parameter.
Adding tests for retrieving multiple entities by their unique identifiers using the $id parameter with an array.
Adding tests for retrieving entities based on specific attribute values using the $filter parameter, including tests for $and and $or operators.
Adding tests for retrieving entities with specific role field values.
Adding tests for retrieving entities with specific link field values targeting roles and relations.
Adding tests for retrieving entities sorted by a specific attribute in ascending and descending order using the $sort parameter.
Adding tests for retrieving a paginated subset of entities using the $offset and $limit parameters.
Adding tests for retrieving entities with nested link fields, traversing multiple levels of relationships.
Adding tests for retrieving entities with nested role fields, traversing multiple levels of relationships.
Adding a test that combines multiple query features in a single query.
Summary
The changes in this pull request include:
Added 20+ new query tests covering a wide range of scenarios
Modified the tests/unit/queries/query.ts file to include the new test cases
Utilized the runQuery helper function to execute the queries and validate the results
Fixes #69.
[!TIP]
To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
This is an automated message generated by Sweep AI.
Purpose
This pull request adds a comprehensive set of query tests to the Blitz ORM project. The tests cover a wide range of query features and scenarios to ensure the correct functioning of the query engine.
Description
The changes in this pull request include:
$fields
parameter.$fields
parameter.$id
parameter.$id
parameter with an array.$filter
parameter, including tests for$and
and$or
operators.$sort
parameter.$offset
and$limit
parameters.Summary
The changes in this pull request include:
tests/unit/queries/query.ts
file to include the new test casesrunQuery
helper function to execute the queries and validate the resultsFixes #69.
This is an automated message generated by Sweep AI.