Skip to content

Commit

Permalink
Merge pull request #673 from SeguinBe/master
Browse files Browse the repository at this point in the history
Adding the option of using POST for queries in SPARQLStore
  • Loading branch information
joernhees authored Dec 5, 2016
2 parents 38445f5 + 87f71da commit 2a869ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rdflib/plugins/stores/sparqlstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def __init__(self,
sparql11=True, context_aware=True,
node_to_sparql=_node_to_sparql,
node_from_result=_node_from_result,
default_query_method=GET,
**sparqlwrapper_kwargs):
"""
"""
Expand All @@ -259,6 +260,7 @@ def __init__(self,
self.context_aware = context_aware
self.graph_aware = context_aware
self._timeout = None
self.query_method = default_query_method

# Database Management Methods
def create(self, configuration):
Expand Down Expand Up @@ -322,6 +324,7 @@ def query(self, query,
" ".join(self.node_to_sparql(initBindings[x]) for x in v))

self.resetQuery()
self.setMethod(self.query_method)
if self._is_contextual(queryGraph):
self.addParameter("default-graph-uri", queryGraph)
self.timeout = self._timeout
Expand Down

0 comments on commit 2a869ca

Please sign in to comment.