Skip to content

Commit

Permalink
Merge pull request #1 from discoverygarden/unlimit_query_limit
Browse files Browse the repository at this point in the history
Unlimit query limit
  • Loading branch information
willtp87 committed Jun 13, 2012
2 parents 23009e9 + 6a0550d commit 499d876
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/fcrepo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,20 @@ def searchObjects(self, query, fields, terms=False, maxResults=10):

def searchTriples(self, query, lang='sparql', format='Sparql',
limit=100, type='tuples', dt='on', flush=True):

flush = str(flush).lower()
url = u'/risearch?%s' % urllib.urlencode({'query':query,
'lang':lang,
'flush': flush,
'format':format,
'limit':limit,
'type':type,
'dt':dt})
URL_pramaters = {'query':query,
'lang':lang,
'flush': flush,
'format':format,
'type':type,
'dt':dt}

#conditionaly set limit if there is one. (so it can be set to None)
if limit:
URL_pramaters['limit'] = limit

url = u'/risearch?%s' % urllib.urlencode(URL_pramaters)
#Fedora started needing authentication in 3.5 for RI, tested in 3.4 as well
headers = self.api.connection.form_headers
headers['Accept:'] = 'text/xml'
Expand Down

0 comments on commit 499d876

Please sign in to comment.