in reply to more of SQL::Abstract
It provides a very natural and flexible way to mix Perl with SQL, handling bind variables for you along the way. It does handle some special cases to make INSERTS, UPDATES and "IN" clauses especially easy (like SQL::Abstract does).use SQL::Interpolate (qw/sql_interp/); my ($sql,@bind) = sql_interp( " city == ",\$city," AND (sale == 1 OR rent == 1)" );
After using SQL::Abstract for a long time, I'm now cheerleading SQL::Interpolate.
Like you, I hit a wall with SQL::Abstract when trying to use nested and grouped "AND and "OR" clauses. At best it was hard to read. At worst it was impossible.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: switching from SQL::Abstract to SQL::Interpolate
by merlyn (Sage) on Jan 09, 2005 at 04:05 UTC | |
by mrdave (Initiate) on Jan 11, 2005 at 06:44 UTC |