what was that pyscopg mess?

This commit is contained in:
Elijah 2024-12-18 20:27:29 +00:00
parent 62f15a4dbe
commit 73416e3aaf

View File

@ -83,7 +83,7 @@ class DBConfig(Base):
) )
@classmethod @classmethod
def postgresql_psycopg2( def postgresql_psycopg(
cls, cls,
database: str, database: str,
username: str, username: str,
@ -91,7 +91,7 @@ class DBConfig(Base):
host: str | None = None, host: str | None = None,
port: int | None = 5432, port: int | None = 5432,
) -> DBConfig: ) -> DBConfig:
"""Create an instance with postgresql+psycopg2 engine. """Create an instance with postgresql+psycopg engine.
Args: Args:
database: Database name. database: Database name.
@ -104,7 +104,7 @@ class DBConfig(Base):
DBConfig instance. DBConfig instance.
""" """
return cls( return cls(
engine="postgresql+psycopg2", engine="postgresql+psycopg",
username=username, username=username,
password=password, password=password,
host=host, host=host,