--- ZSQLExtend/ZSQLExtend.py 2011/02/11 19:08:49 1.137 +++ ZSQLExtend/ZSQLExtend.py 2011/02/14 22:11:03 1.139 @@ -10,6 +10,8 @@ from Products.PageTemplates.ZopePageTemp from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.ZSQLMethods.SQL import SQLConnectionIDs +from Shared.DC.ZRDB.Results import Results + from xml.sax.saxutils import escape from types import * import Shared.DC.ZRDB.DA @@ -987,7 +989,19 @@ class ZSQLExtendFolder(Folder,Persistent except: logger("ZSQLResetConnection",logging.ERROR, '%s %s'%sys.exc_info()[:2]) + def ZSQLSimpleSearch(self,query=None,max_rows=1000000): + """new simple search""" + logging.debug("new ZSQLSimpleSearch X %s"%query) + # get Connection instance + con = self.getConnectionObj() + # call to get db object + dbc = con() + res = dbc.query(query, max_rows=max_rows) + # return result set as Result object with Brains + return Results(res) + + def oldZSQLSimpleSearch(self,query=None,max_rows=1000000): """simple search""" logging.error("ZSQLSimpleSearch X %s"%query) #print query