Fork me on GitHub
#sql
<
2016-11-06
>
leo.ribeiro19:11:17

hey guys! anybody knows if I can use "dynamic" query criteria in yesql? https://github.com/Code-for-Miami/restaurant-inspections-api/blob/modern-18F-api/resources/sql/select_inspections_by_all.sql#L18 -- I would like to change from this line on to the end to something like :dynamicFilter and then in my code use dynamic criteria fields as I need

mikeb21:11:18

Looks like you're site is using mysql for the database so it's not much help here, but I wrote a postgres specific lib that handles this specific need. https://github.com/mikeball/foundation/blob/master/docs/dynamic-queries.md