I am trying to make a simple Rose DB call: $id = xyz; $name = "company";
DataB::testTable::Manager->get_testTable( query =>[ id => $id, name => $name ] );
in it possible to not have the whole query written every time, and declare it like a string variable such that i can just call
DataB::testTable::Manager->get_testTable( query =>[ $query ] );
where $query = qq { id => $id , name => $name };
Please Help
Well actually i figured out how to do that . Its not that complicated. Only thing is RoseDB objects expect an array reference for a query. So something like this works :
my @query = ( id => $id, name => $name );
Just thought would answer it myself, incase someonelse is looking for a solution to this
By what I understood from your question, I am giving this answer. Try this one.
Hope, this gives some idea to you.
Edit for "Hash with Array reference":
check out this : How to pass a a string variable as "query" for get Manager call?