Skip to content

Commit

Permalink
standardize
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Jan 21, 2024
1 parent 147a3f4 commit 5617a95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def delete_table(self):
Deletes the table used to store Haystack documents.
"""

delete_sql = SQL("DROP TABLE IF EXISTS {}").format(Identifier(self.table_name))
delete_sql = SQL("DROP TABLE IF EXISTS {table_name}").format(table_name=Identifier(self.table_name))

self._execute_sql(delete_sql, error_msg="Could not delete table in PgvectorDocumentStore")

Expand Down Expand Up @@ -235,7 +235,7 @@ def count_documents(self) -> int:
Returns how many documents are present in the document store.
"""

sql_count = SQL("SELECT COUNT(*) FROM {}").format(Identifier(self.table_name))
sql_count = SQL("SELECT COUNT(*) FROM {table_name}").format(table_name=Identifier(self.table_name))

count = self._execute_sql(sql_count, error_msg="Could not count documents in PgvectorDocumentStore").fetchone()[
0
Expand Down

0 comments on commit 5617a95

Please sign in to comment.