First glance at that API looks real nice, I'm going to check this out, thanks :)
- hugi
> On 11 Sep 2020, at 07:06, Andrus Adamchik wrote:
>
> 4.2 for the first time exposes generated SQL as an AST, so tweaking it has
> become much easier. This is the feature that made possible to support
>
4.2 for the first time exposes generated SQL as an AST, so tweaking it has
become much easier. This is the feature that made possible to support
geospatial and JSON types.
Nikita, please correct me if I am wrong with the following instructions (as
this API is still in flux). So.. To customize
Thanks John, not a bad idea.
I'd prefer it if the current method ports though (since I'd have to create
triggers for something like 200 columns). But if that isn't possible we might
consider this.
- hugi
> On 8 Sep 2020, at 20:33, John Huss wrote:
>
> Since you are already at the DB level
Since you are already at the DB level (outside of cayenne) making this
change, I would just use a BEFORE UPDATE row-level trigger in Postgres. You
can change the value there.
Something like this would work:
CREATE OR REPLACE FUNCTION company_default()
RETURNS trigger AS $$
BEGIN
Working with old DB designs really results in the weirdest questions…
So… I've been working around a design problem in a customer DB by using my own
BatchTranslatorFactory. The functionality was that if a column is called
"company", every update wraps the column's new value in a coalesce