]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: add `Transformer.as_literal()` to convert literals to sql
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 20 Mar 2022 18:24:53 +0000 (19:24 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 10 May 2022 17:13:26 +0000 (19:13 +0200)
commitfe8c379cf1b7b188038c87ce310eaec572922004
tree7fee3c877ed0fa7f7d9d5630f3a37619702cc78e
parent57b638957611dea7fbc56bc1490b5f0c717c5b5c
feat: add `Transformer.as_literal()` to convert literals to sql

This allows to keep a cache oid -> representation that will be
invalidated automatically if encoding or oid mapping changes, as well as
optimising the function in C.
psycopg/psycopg/_transform.py
psycopg/psycopg/abc.py
psycopg/psycopg/sql.py
psycopg_c/psycopg_c/_psycopg.pyi
psycopg_c/psycopg_c/_psycopg/transform.pyx