On 8/1/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: > a- conditional 'or' (or whatever else: > > current functionality > > my @ors; > my $results= $class->get_items( > query=> [ > or=> [EMAIL PROTECTED] , > is_deleted=> 0 > ], > db=> $kw_args{db} > ); > > creates > SELECT x FROM y WHERE () AND is_deleted = 0
I've changed the code in SVN to ignore "and" and "or" query parameters if the value on the right-hand side is a reference to an empty array. > b- bracket all conditions > > [...] Postgres and i'm told some other DBs suggest using the brackets per > conditional though- more importantly than making things clear for the planner, > it makes things super clear for users. I can't imagine it making any real difference, but I can be persuaded otherwise by a benchmark or EXPLAIN ANALYZE output. Until then, I don't think it's worth wading into the Manager and QueryBuilder (both of which are very hairy and due for a good gutting some time in the medium-range future) to add this feature. -John ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object