Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for parsing Firestore database references from string #24

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

pavadeli
Copy link
Member

@pavadeli pavadeli commented Mar 8, 2024

This change adds a new enum Ref which represents a reference to either the database root, a single collection, or a single document in a Firestore database. It includes methods to extract the different types of references, check if one reference is a parent of another, and implements the Display trait for formatting. Additionally, it introduces error handling for invalid references and conversion to tonic::Status. The implementation also includes parsing logic from string to create a Ref instance.

This change adds a new enum `Ref` which represents a reference to either the database root, a single collection, or a single document in a Firestore database. It includes methods to extract the different types of references, check if one reference is a parent of another, and implements the `Display` trait for formatting. Additionally, it introduces error handling for invalid references and conversion to `tonic::Status`. The implementation also includes parsing logic from string to create a `Ref` instance.
@pavadeli pavadeli enabled auto-merge March 8, 2024 21:58
@pavadeli pavadeli merged commit 37634a5 into master Mar 8, 2024
3 of 4 checks passed
@pavadeli pavadeli deleted the Add-reference-struct-implementation branch March 8, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant