You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SORRY!! I didn't know how to title this discussion.
I really like sqlc, I am far from being an expert so I am asking if what I am thinking is possible and I can't find how to do it or if it is out of scope for this project. Probably it is from my current understanding.
Let's suppose I have a table like:
name, surname, city, country
And I want to display it in an HTML table so I do my API with a ListPeople that returns those records. Cool, then I want to add filters, server side for a few of those columns like: country and city.
Do I need to write all the possible combinations like:
ListAll
ListFilteredByCity
...ByCityAndCountry
...ByCountry
Or do I have a way to dynamically inject part of the query if I need to build something like that? My case has more than 2 potential filters.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
SORRY!! I didn't know how to title this discussion.
I really like
sqlc
, I am far from being an expert so I am asking if what I am thinking is possible and I can't find how to do it or if it is out of scope for this project. Probably it is from my current understanding.Let's suppose I have a table like:
And I want to display it in an HTML table so I do my API with a ListPeople that returns those records. Cool, then I want to add filters, server side for a few of those columns like: country and city.
Do I need to write all the possible combinations like:
Or do I have a way to dynamically inject part of the query if I need to build something like that? My case has more than 2 potential filters.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions