The best I think you could achieve would be something
like this...
Global ExecuterService
es;
rule "execute some SQL"
when
$q :
Query()
$f :
Fields(query == $q)
$t :
Tables(query == $q)
$p :
Predicates(query == $q)
then
es.execute($f, $t, $p);
end
Still not sure if a rules engine is your best option,
if I understand your use case correctly.
Let me see if I understand correctly.
You want the user to be able to define the SQL query
(table, field list, predicates) and have the resulting SQL executed within
Drools?
Is this your only requirement for the rules engine; if so
have you thought a rules engine might not be your best
option.
Hi Anstis,
I'm
creating a rule engine which is basically a SQL query executor. for that i
need to have a drool
file where i can add new rules to build the
different query criteria. user should be able to create new selection
criteria.
is there any way that i can define sql queries in side the
drool files.
thanks