Module queryFactory
[hide private]
[frames] | no frames]

Source Code for Module queryFactory

 1   
 2   
 3  # Give qf a string, get back a query object 
 4  # Why?  ...  Removes dependency on PyZ3950.CQLParser in all scripts 
 5  # Allows for non CQL queries, with sufficient translation 
 6  # Allows for query generation during workflows from string 
 7   
 8   
 9  from PyZ3950.CQLParser import parse 
10  from baseObjects import QueryFactory 
11   
12 -class SimpleQueryFactory(QueryFactory):
13
14 - def process_string(self, session, data, type="cql", db=None):
15 if type == "cql": 16 return parse(data) 17 else: 18 raise NotImplementedError()
19