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: queries to add and remove single or multiple trees #2

Merged
merged 3 commits into from
Oct 26, 2024

Conversation

AlexWang05
Copy link
Member

@AlexWang05 AlexWang05 commented Oct 11, 2024

What's new in this PR

Description

Query support for invoking existing Supabase Database Functions for the following actions:

  • Add a single tree given a species, using a random uuid and default values for the rest of the properties.
  • Add multiple trees given a species and quantity.
  • Remove a tree given a uuid.
  • Remove multiple trees given a list of uuids.

How to review

Examine supabase/queries.ts and use of client.ts for Supabase queries. Check compliance with Linear sprint specs.

Next steps

Testing

All queries and Supabase Functions are tested manually, through invoking buttons written to trigger queries in App.tsx. Adding single and multiple trees, and removing single and multiple trees (UUID JSON) worked as intended,and is reflected in the database.

Relevant links

Online sources

N/A

Related PRs

N/A

CC: @christophertorres1

@AlexWang05 AlexWang05 changed the title Basic Supabase Table Queries Basic Supabase Table Queries, Testing, Handling of Multiple UUIDs Oct 12, 2024
@AlexWang05 AlexWang05 assigned AlexWang05 and unassigned AlexWang05 Oct 18, 2024
Copy link
Contributor

@adityapawar1 adityapawar1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is one small bug with addMultiple trees (see the other review comment), but other than that it looks good!

src/supabase/queries.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@christophertorres1 christophertorres1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes but wonderful job overall!

src/supabase/queries.ts Show resolved Hide resolved
src/supabase/queries.ts Outdated Show resolved Hide resolved
@christophertorres1 christophertorres1 changed the title Basic Supabase Table Queries, Testing, Handling of Multiple UUIDs feat: queries to add and remove single or multiple trees Oct 26, 2024
@christophertorres1 christophertorres1 merged commit d2d2b5b into main Oct 26, 2024
2 checks passed
katyhonguyen pushed a commit that referenced this pull request Oct 31, 2024
* supabase queries to add and remove trees.

* query testing.
christophertorres1 pushed a commit that referenced this pull request Nov 13, 2024
* supabase queries to add and remove trees.

* query testing.
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.

3 participants