hugsql

2019-04-22T21:21:28.003100Z

is there a way to use hugsql to generate update fns with parameters that may or may not be included in the actual call to your db-fn? e.g.: UPDATE my_table SET a = :a, b = :b WHERE id = :id; invoked with (my-fn db {:a "hey" :id 123}) would generate a sql exp like UPDATE my_table SET a = "hey" WHERE id = 123;

curtis.summers 2019-04-22T22:03:38.004600Z

Yes, you can achieve this with Clojure Expressions: https://www.hugsql.org/#using-expressions

1👍