Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
use column transformer for EXCLUDED column name on upsert query of PostgreSQL #886
Requery does not currently use the column transformer when generating EXCLUDED column name in Postgres.
Therefore, when specifying a column transformer that makes the column name a snake case, Requery generate a SQL as bellow:
This query does not work well because the column name used in EXCLUDED clause wasn’t converted correctly (it must be a ‘message_title’, but is a ‘messageTitle’).
In my patch, I changed a UpsertOnConflictDoUpdate class to use a column transformer when generating EXCLUDED column names, so it generates a SQL as bellow: