refactor: formatting fix for PR
Fixed formatting for files in pull request Refactor COG-678
This commit is contained in:
parent
56367cb0c3
commit
b56a1dee59
2 changed files with 10 additions and 10 deletions
|
|
@ -188,7 +188,7 @@ class SQLAlchemyAdapter():
|
|||
result = await session.execute(query)
|
||||
|
||||
# Fetch all rows as a list of dictionaries
|
||||
rows = result.mappings().all() # Use `.mappings()` to get key-value pairs
|
||||
rows = result.mappings().all()
|
||||
return rows
|
||||
|
||||
async def execute_query(self, query):
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ from sqlalchemy import text
|
|||
created=False
|
||||
|
||||
async def create_db_and_tables():
|
||||
vector_config = get_vectordb_config()
|
||||
vector_engine = get_vector_engine()
|
||||
vector_config = get_vectordb_config()
|
||||
vector_engine = get_vector_engine()
|
||||
|
||||
if vector_config.vector_db_provider == "pgvector":
|
||||
global created
|
||||
if not created:
|
||||
await vector_engine.create_database()
|
||||
created = True
|
||||
if vector_config.vector_db_provider == "pgvector":
|
||||
global created
|
||||
if not created:
|
||||
await vector_engine.create_database()
|
||||
created = True
|
||||
|
||||
async with vector_engine.engine.begin() as connection:
|
||||
await connection.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
|
||||
async with vector_engine.engine.begin() as connection:
|
||||
await connection.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue