Skip to content

Commit

Permalink
fix: Update PostgresDatastore type as PgClient provideers.
Browse files Browse the repository at this point in the history
  • Loading branch information
anubhav756 committed Sep 20, 2024
1 parent 2907d4a commit 5d1bced
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion retrieval_service/datastore/providers/alloydb.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from pgvector.asyncpg import register_vector
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from postgres import Client as PgClient


import models

Expand All @@ -41,7 +43,7 @@ class Config(BaseModel, datastore.AbstractConfig):

class Client(datastore.Client[Config]):
__connector: Optional[AsyncConnector] = None
__pg_ds: PostgresDatastore
__pg_ds: PgClient

@datastore.classproperty
def kind(cls):
Expand Down
4 changes: 3 additions & 1 deletion retrieval_service/datastore/providers/cloudsql_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from pgvector.asyncpg import register_vector
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from postgres import Client as PgClient


import models

Expand All @@ -40,7 +42,7 @@ class Config(BaseModel, datastore.AbstractConfig):


class Client(datastore.Client[Config]):
__pg_ds: PostgresDatastore
__pg_ds: PgClient
__connector: Optional[Connector] = None

@datastore.classproperty
Expand Down
3 changes: 2 additions & 1 deletion retrieval_service/datastore/providers/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pgvector.asyncpg import register_vector
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from postgres import Client as PgClient

import models

Expand All @@ -38,7 +39,7 @@ class Config(BaseModel, datastore.AbstractConfig):


class Client(datastore.Client[Config]):
__pg_ds: PostgresDatastore
__pg_ds: PgClient

@datastore.classproperty
def kind(cls):
Expand Down

0 comments on commit 5d1bced

Please sign in to comment.