Subject | Re: [Firebird-Architect] old is distinct from new |
---|---|
Author | Björn Reimer |
Post date | 2009-01-13T17:28:51Z |
A>> Addition of non-required clause except
A>> if (old is distinct from new except field5, field8, field123)
A>> then do_something;
A>> can be even more useful (i.e. compare all fields except listed). Though this
A>> looks like really new feature, not depending from ROW datatype.
select * - {field5, field8, field123} from table
...
What I'd like to have much more would be a record or row datatype
so you could pass old or new to a stored procedure or use something
like
select * from table
into rowdatatype
inside a stored procedure.
--
Björn Reimer - RRZE
A>> if (old is distinct from new except field5, field8, field123)
A>> then do_something;
A>> can be even more useful (i.e. compare all fields except listed). Though this
A>> looks like really new feature, not depending from ROW datatype.
> it still relies on the row datatype if you also have a typeTo be consequent you'd also need
> constructor and a difference operator. Something like
> if (old - {field5, field8, field123} is distinct from
> new - {field5, field8, field123}) then do_something;
> assuming {} is the constructor and - the difference operator.
select * - {field5, field8, field123} from table
...
What I'd like to have much more would be a record or row datatype
so you could pass old or new to a stored procedure or use something
like
select * from table
into rowdatatype
inside a stored procedure.
--
Björn Reimer - RRZE