1010from text_2_sql_core .utils .database import DatabaseEngine , DatabaseEngineSpecificFields
1111
1212
13- class PostgresqlSqlConnector (SqlConnector ):
13+ class PostgresSqlConnector (SqlConnector ):
1414 def __init__ (self ):
1515 super ().__init__ ()
1616
17- self .database_engine = DatabaseEngine .POSTGRESQL
17+ self .database_engine = DatabaseEngine .POSTGRES
1818
1919 @property
2020 def engine_specific_rules (self ) -> str :
@@ -67,10 +67,10 @@ async def query_execution(
6767 logging .info (f"Running query: { sql_query } " )
6868 results = []
6969
70- if "Text2Sql__Postgresql__ConnectionString " in os .environ :
71- logging .info ("Postgresql Connection string found in environment variables." )
70+ if "Text2Sql__Postgres__ConnectionString " in os .environ :
71+ logging .info ("Postgres Connection string found in environment variables." )
7272
73- p = urlparse (os .environ ["Text2Sql__Postgresql__ConnectionString " ])
73+ p = urlparse (os .environ ["Text2Sql__Postgres__ConnectionString " ])
7474
7575 postgres_connections = {
7676 "dbname" : p .path [1 :],
@@ -81,14 +81,14 @@ async def query_execution(
8181 }
8282 else :
8383 logging .warning (
84- "Postgresql Connection string not found in environment variables. Using individual variables."
84+ "Postgres Connection string not found in environment variables. Using individual variables."
8585 )
8686 postgres_connections = {
87- "dbname" : os .environ ["Text2Sql__Postgresql__Database " ],
88- "user" : os .environ ["Text2Sql__Postgresql__User " ],
89- "password" : os .environ ["Text2Sql__Postgresql__Password " ],
90- "port" : os .environ ["Text2Sql__Postgresql__Port " ],
91- "host" : os .environ ["Text2Sql__Postgresql__ServerHostname " ],
87+ "dbname" : os .environ ["Text2Sql__Postgres__Database " ],
88+ "user" : os .environ ["Text2Sql__Postgres__User " ],
89+ "password" : os .environ ["Text2Sql__Postgres__Password " ],
90+ "port" : os .environ ["Text2Sql__Postgres__Port " ],
91+ "host" : os .environ ["Text2Sql__Postgres__ServerHostname " ],
9292 }
9393
9494 # Establish an asynchronous connection to the PostgreSQL database
0 commit comments