I'll check SQL::Interpolate. Thank you!
It's possible that you're building up your query clauses too early. Why not just build up the "where" hash that SQL::Abstract wants and turn that into your statement and bind variable only just before running the query?
Because my code takes an anonymous closure as a callback, roughly along these lines:
# of course this is just an excerpt of code. sub { my $caller=shift; $rf->execute(substvars(@bind, @_)) or $caller->complain("Error executing this and that."); $rf->fetchall_arrayref; }
This is a closure around $rf and @bind. $rf is an object of the class DBIx::ContextualFetch::st.
All in all this is a clean approach that I like. But I don't like the substvars() bit, which IMHO makes it dirty...
In reply to Re^2: Question re SQL::Abstract (or something similar, whose existence I ignore!)
by blazar
in thread Question re SQL::Abstract (or something similar, whose existence I ignore!)
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |