Psycopg opted to use a custom parameter placeholder, so we need to override the default
| 41 | |
| 42 | |
| 43 | class PsycopgSQLQueryBuilder(PostgreSQLQueryBuilder): |
| 44 | """ |
| 45 | Psycopg opted to use a custom parameter placeholder, so we need to override the default |
| 46 | """ |
| 47 | |
| 48 | def get_parameterized_sql(self, ctx: SqlContext | None = None) -> tuple[str, list]: |
| 49 | if not ctx: |
| 50 | ctx = self.QUERY_CLS.SQL_CONTEXT |
| 51 | if not ctx.parameterizer: |
| 52 | ctx = ctx.copy(parameterizer=Parameterizer(placeholder_factory=lambda _: "%s")) |
| 53 | return super().get_parameterized_sql(ctx) |
| 54 | |
| 55 | |
| 56 | class PsycopgClient(postgres_client.BasePostgresClient): |
no outgoing calls
no test coverage detected
searching dependent graphs…