Ash FrameworkAF
Ash Framework3y ago
2 replies
Terry Lee

How to put the same value at multiple places in a fragment?

Say I have a custom postgres function and
Is it possible to do the following fragment fragment("SELECT my_custom_function(1/<rate>, 2/<rate>, 3*<rate>) FROM lookup_values WHERE id=<id>", rate, id)?

Today, I will need to do fragment("SELECT my_custom_function(1/?, 2/?, 3*?) FROM lookup_values WHERE id=?", rate, rate, rate, id)
Was this page helpful?