I would like to suggest a generic query which could allow queries within 
the DAL framework for functions supported by the database but not web2py's 
DAL by feeding in the raw query as would be expected in SQL native to a 
particular database. While DAL hides alot of subtle differences in 
different database engines, most projects would be using a particular 
instance and hence, I think the code would be very straightforward and 
along the lines of:

In dal.py

def raw_where(self, value, op):
  db = self.db
  returnQuery(db, op, self,value)   

and so in a controller somewhere...

def OPERATOR(self, first, second):
  return '(%s && %s)' % (self.expand(first), self.expand(second)) 

db(db.table.field.raw_where(parameter, OPERATOR)).select()


would be possible.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to