db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "TriggerImplementation" by DanDebrunner
Date Tue, 02 May 2006 22:26:38 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by DanDebrunner:
http://wiki.apache.org/db-derby/TriggerImplementation

------------------------------------------------------------------------------
  accessed using standard SQL.
  
  === Issues ===
-  * The VTI classes implement java.sql.!ResultSet directly and wrap a !ResultSet obtained
from the embedded JDBC driver. This has performance and functionality impact. The !TriggerOldTransitionRows
and !TriggerNewTransitionRows classes must be updated to match each JDBC release, currently
they are stuck at JDBC 1.2. Changing them to implement java.sql.!PreparedStatement would mean
they could instead return the wrapped !ResultSet directly. For example getBlob is not currently
supported for statement triggers.
+  * The VTI classes (!TriggerOldTransitionRows and !TriggerNewTransitionRows) implement java.sql.!ResultSet
directly and wrap a !ResultSet obtained from the embedded JDBC driver. This has performance
and functionality impact. The !TriggerOldTransitionRows and !TriggerNewTransitionRows classes
must be updated to match each JDBC release, currently they are stuck at JDBC 1.2. Changing
them to implement java.sql.!PreparedStatement would mean they could instead return the wrapped
!ResultSet directly. For example getBlob is not currently supported for statement triggers.
   * Any access to any column in a row trigger requires going through getObject, thus creating
Objects for every value.
   * Accessing multiple columns leads to multiple accesses getNewRow() and/or getOldRow()
methods.
   * [http://issues.apache.org/jira/browse/DERBY-1258 DERBY-1258] Since accessing columns
is through JDBC for row triggers, columns with identical upper-cased names are not handled
correctly. Fixed by using column position to fetch row's column value.
@@ -84, +84 @@

  === Possible Changes ===
   * Re-write triggers to not add the indirection through JDBC !ResultSet. Have old/new references
in action statements compile to specific !QueryTree nodes that access the data directly from
a Derby language !ResultSet. Would need to investigate how to handle existing triggers at
upgrade time.
   * Continue with JDBC approach and add code as required to fix issues, e.g. a internal specific
!findColumn implementation that doesn't match JDBC but instead matches column on absolute
name. Might still require a wrapper JDBC object.
+  * Change (!TriggerOldTransitionRows and !TriggerNewTransitionRows) to implement java.sql.!PreparedStatement
and thus use the embedded !ResultSet class directly instead of wrapping it. This allows CLOB/BLOB
support with statement triggers. Change being investigated with 10.2 under DEBRY-438.
   * Use column position rather than column name to fetch a column value for a row trigger.
(Change made)
  

Mime
View raw message