Closed cbaker6 closed 2 years ago
Closes: #123
in the PR description, so I can recognize it.Merging #308 (04d74db) into main (fdbb1d9) will increase coverage by
0.03%
. The diff coverage is92.72%
.
@@ Coverage Diff @@
## main #308 +/- ##
==========================================
+ Coverage 84.56% 84.59% +0.03%
==========================================
Files 114 114
Lines 11661 11700 +39
==========================================
+ Hits 9861 9898 +37
- Misses 1800 1802 +2
Impacted Files | Coverage Δ | |
---|---|---|
Sources/ParseSwift/Types/QueryConstraint.swift | 96.99% <86.66%> (-0.51%) |
:arrow_down: |
Sources/ParseSwift/Types/ParseOperation.swift | 94.71% <100.00%> (+0.35%) |
:arrow_up: |
Sources/ParseSwift/Types/QueryWhere.swift | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fdbb1d9...04d74db. Read the comment docs.
I will reformat the title to use the proper commit message syntax.
New Pull Request Checklist
Issue Description
null
or to set a value tonull
on the server.Related issue: #n/a
Approach
Add the
isNull
andisNotNull
query constraints along with the ability to set a field tonull
on the server when using operations. Note that this is different from querying fordoesNotExist
or using theUnset
operation which produces(undefined)
on the server (MongoDB and Postgres) and dashboard. Setting a value tonull
on a Parse Server using MongoDB produces(null)
. The results from using theisNull
QueryConstraint
will yield values that are either(null)
or(undefined)
. Using thedoesNotExist
QueryConstraint
yields results that are only(undefined)
. Conversely, similar behavior is added forisNotNull
andexists
. For Postgres, this doesn't matter, and the counterparts mentioned above produce the same results. For both MongoDB and Postgres, it recommended to setup your databases and query in a way that is efficient for your particular index's and setup.Improve
QueryWhere
by making at aSet
ofQueryConstraint
's instead of any array. This dedupes the same constraint when encoding the query, improving the encoding speed.TODOs before merging
throw
from operation methods which don't need to be thrown