Use case is to enable queries with dynamic expressions for WHERE clauses, like:
SELECT *
FROM foo
WHERE pggen.predicate('filter_expr')
Sketch:
Generated Go code takes a FilterExpr function that returns (string, error), maybe implementing a generic interface so it's easy to wrap existing Go SQL codegen.
If we implement an interface, we should move it to a different library so folks don't have to depend on the relatively heavyweight dependencies of pggen, namely Docker.
pggen calls FilterExpr and injects code as-is into the query.
Use case is to enable queries with dynamic expressions for WHERE clauses, like:
Sketch:
FilterExpr
function that returns(string, error)
, maybe implementing a generic interface so it's easy to wrap existing Go SQL codegen.