Menu

#165 Enable Trigger to use column name and type

open
None
5
2004-12-15
2004-09-24
No

I have a trigger, which I want to perform on many
tables which have two fields in common.

The structure of some tables might change between
software versions, but, not the names and types of
these two columns.

If Trigger.fire would give me the Table object instead of
the table name and Table.searchColumn was public, I
could use one single trigger to operate on all tables.
And my trigger wouldn't break in case of changes in the
table structure.

In addition to that, it would be possible to retrieve the
type of the column, so there would be more safety when
assigning values to the insert/update row's object array.

I have attached a patch against 1.7.2.4 which
implements this functionality (and updates
org.hsqldb.sample.TriggerSample).

Thanks

Kambiz

Discussion

  • Kambiz Darabi

    Kambiz Darabi - 2004-09-24
     
  • Fred Toussi

    Fred Toussi - 2004-12-15

    Logged In: YES
    user_id=150940

    Sorry for the late response, you should have posted in the
    patch tracker. Changed to Patch for further consideration.

     
  • Fred Toussi

    Fred Toussi - 2004-12-15
    • labels: 325083 -->
    • assigned_to: nobody --> fredt
     

Log in to post a comment.