two things that i'd love to see. if you're down with this idea, i
could probably write the patches myself.
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
suggested
test or ( or anything else ) for a scalar value first, before
generating the brackets
SELECT x FROM y WHERE is_deleted = 0
i do that check already, but its per manager method- building it
into Rose would save me some memory and be useful to others
b- bracket all conditions
just to create cleaner sql
current:
WHERE
a = ? AND
b = ? AND
c = ?
suggested
WHERE
( a = ? ) AND
( b = ? ) AND
( c = ? )
since most people don't do overy complex things with Rose, it
wouldn't have much practical value. 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.
just two simple things i'd like to see. i'd be willing to take a
stab at patching them if you think they're worth it.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object