Subject | Is this worth to suggest? |
---|---|
Author | Clément Doss |
Post date | 2002-04-07T11:16:01Z |
Hi,
As I was converting my application to FB1, and I wonder if we could suggest a feature to FireBird.
I often need to place the Inclusion date, the user who included, the last update date, and the user
who made the last update into some key structures of the database.
Well, I am doing this today using triggers. I was hoping to have a "declarative" way of doing that.
For example, the 'INSERT' part can be handled using the DEFAULT keyword when declaring the field.
How about a keyword to update a field when the record is updated for example:
create table Employee(
EmployeeID integer primary key,
DateInsert date default current_date,
UserInsert varchar(20) default username,
Address varchar(60),
Phone varchar(22),
LastUpdate date when update default current_timestamp,
UserUpdate varchar(20) when update default username
);
When the a new record is posted DateInsert, UserInsertm LastUpdate, UserUpdate would be updated.
After that only LastUpdate and userUpdate would be updated.
Is this worth a suggestion to FB?
Best regards,
Clément
As I was converting my application to FB1, and I wonder if we could suggest a feature to FireBird.
I often need to place the Inclusion date, the user who included, the last update date, and the user
who made the last update into some key structures of the database.
Well, I am doing this today using triggers. I was hoping to have a "declarative" way of doing that.
For example, the 'INSERT' part can be handled using the DEFAULT keyword when declaring the field.
How about a keyword to update a field when the record is updated for example:
create table Employee(
EmployeeID integer primary key,
DateInsert date default current_date,
UserInsert varchar(20) default username,
Address varchar(60),
Phone varchar(22),
LastUpdate date when update default current_timestamp,
UserUpdate varchar(20) when update default username
);
When the a new record is posted DateInsert, UserInsertm LastUpdate, UserUpdate would be updated.
After that only LastUpdate and userUpdate would be updated.
Is this worth a suggestion to FB?
Best regards,
Clément