mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-28 07:59:37 +02:00
Fix graph query in Cassandra (#168)
This commit is contained in:
parent
dc0f54f236
commit
7a64385a57
2 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ def to_value(x):
|
||||||
if x.startswith("http:") or x.startswith("https:"):
|
if x.startswith("http:") or x.startswith("https:"):
|
||||||
return Value(value=x, is_uri=True)
|
return Value(value=x, is_uri=True)
|
||||||
else:
|
else:
|
||||||
return Value(value=x, is_uri=True)
|
return Value(value=x, is_uri=False)
|
||||||
|
|
||||||
def to_subgraph(x):
|
def to_subgraph(x):
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class TrustGraph:
|
||||||
|
|
||||||
def get_po(self, p, o, limit=10):
|
def get_po(self, p, o, limit=10):
|
||||||
return self.session.execute(
|
return self.session.execute(
|
||||||
f"select s from {self.table} where p = %s and o = %s allow filtering limit {limit}",
|
f"select s from {self.table} where p = %s and o = %s limit {limit} allow filtering",
|
||||||
(p, o)
|
(p, o)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue