Fix parameter reference and apply code formatting improvements
This commit is contained in:
parent
a0593ec1c9
commit
185b576101
1 changed files with 12 additions and 8 deletions
|
|
@ -3068,7 +3068,7 @@ class PGGraphStorage(BaseGraphStorage):
|
||||||
if readonly:
|
if readonly:
|
||||||
data = await self.db.query(
|
data = await self.db.query(
|
||||||
query,
|
query,
|
||||||
params=self.params,
|
params,
|
||||||
multirows=True,
|
multirows=True,
|
||||||
with_age=True,
|
with_age=True,
|
||||||
graph_name=self.graph_name,
|
graph_name=self.graph_name,
|
||||||
|
|
@ -3387,7 +3387,9 @@ class PGGraphStorage(BaseGraphStorage):
|
||||||
logger.error(f"[{self.workspace}] Error during edge deletion: {str(e)}")
|
logger.error(f"[{self.workspace}] Error during edge deletion: {str(e)}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
async def get_nodes_batch(self, node_ids: list[str], batch_size: int = 1000) -> dict[str, dict]:
|
async def get_nodes_batch(
|
||||||
|
self, node_ids: list[str], batch_size: int = 1000
|
||||||
|
) -> dict[str, dict]:
|
||||||
"""
|
"""
|
||||||
Retrieve multiple nodes in one query using UNWIND.
|
Retrieve multiple nodes in one query using UNWIND.
|
||||||
|
|
||||||
|
|
@ -3453,7 +3455,9 @@ class PGGraphStorage(BaseGraphStorage):
|
||||||
|
|
||||||
return nodes_dict
|
return nodes_dict
|
||||||
|
|
||||||
async def node_degrees_batch(self, node_ids: list[str], batch_size: int = 500) -> dict[str, int]:
|
async def node_degrees_batch(
|
||||||
|
self, node_ids: list[str], batch_size: int = 500
|
||||||
|
) -> dict[str, int]:
|
||||||
"""
|
"""
|
||||||
Retrieve the degree for multiple nodes in a single query using UNWIND.
|
Retrieve the degree for multiple nodes in a single query using UNWIND.
|
||||||
Calculates the total degree by counting distinct relationships.
|
Calculates the total degree by counting distinct relationships.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue