[rules-users] How to execute the SQL query using drools

Anstis, Michael (M.) manstis1 at ford.com
Tue Jun 23 05:04:23 EDT 2009


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.


________________________________

	From: Anstis, Michael (M.) 
	Sent: 23 June 2009 10:00
	To: 'amilac at hsenidmobile.com'; 'Rules Users List'
	Subject: RE: [rules-users] How to execute the SQL query using
drools
	
	
	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.


________________________________

		From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Amila Silva
		Sent: 23 June 2009 09:49
		To: rules-users at lists.jboss.org
		Subject: [rules-users] How to execute the SQL query
using drools
		
		

		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
		
		  

		
		

		
		

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090623/7b286310/attachment.html 


More information about the rules-users mailing list