ioxiocom / firedantic

Database models for Firestore using Pydantic base models.
BSD 3-Clause "New" or "Revised" License
43 stars 14 forks source link

Add order_by, limit and offset in find query #62

Closed TheHelias closed 5 months ago

TheHelias commented 6 months ago

Add order_by, limit and offset as options in find query parameters Updated urllib3 for fix vulnerabilities

lietu commented 6 months ago

If our typing expects you to use Union[Literal["ASCENDING"], Literal["DESCENDING"]], then why do we use Query.ASCENDING and Query.DESCENDING in tests and examples? What are the guarantees that Query properties do not change?

antont commented 6 months ago

If our typing expects you to use Union[Literal["ASCENDING"], Literal["DESCENDING"]], then why do we use Query.ASCENDING and Query.DESCENDING in tests and examples? What are the guarantees that Query properties do not change?

Fair point, would at least make sense to use them in the typing as well.

Usually I dislike having strings in the code, so I'd like to use readily defined constants, and there they are already defined. If those change in the Firebase SDK, I guess that would then inflict changes to Firedantic as well anyway. I wouldn't expect those to change though.

joakimnordling commented 5 months ago

The same set of changes were submitted as a second PR https://github.com/ioxiocom/firedantic/pull/63 that was merged. Closing this one.