You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do the postgres support the similar functionality like the typeorm transformer? We have a request to convert the column value before updating/querying
exportinterfaceColumnOptionsextendsColumnCommonOptions{/** * Specifies a value transformer that is to be used to (un)marshal * this column when reading or writing to the database. */transformer?: ValueTransformer|ValueTransformer[];}
i noticed the postgres also support transformer, but seem to a global change for all the tables, and the to is commented
/** Transforms incoming and outgoing row values */
value?: ((value: any)=>any)|{/** Transform function for values in result rows */from?: ((value: unknown,column: postgres.Column<string>)=>any)|undefined;// to?: ((value: unknown) => any) | undefined; // unused}|undefined;
The text was updated successfully, but these errors were encountered:
You should have the info needed to make such functionality using transform, but that said, this is not an ORM, but a postgres driver embracing being as close to PostgreSQL as possible, so I'd recommend doing what you want to in a DB level trigger instead if possible?
Dear expert,
Do the postgres support the similar functionality like the typeorm transformer? We have a request to convert the column value before updating/querying
i noticed the postgres also support transformer, but seem to a global change for all the tables, and the
to
is commentedThe text was updated successfully, but these errors were encountered: