ozeigermann    2003/11/25 06:27:42

  Modified:    proposals/stores/org/apache/slide/store/impl/rdbms
                        StandardRDBMSAdapter.java
  Log:
  Replaced even more SQLServer specific deletes with more general ones
  
  Revision  Changes    Path
  1.7       +8 -8      
jakarta-slide/proposals/stores/org/apache/slide/store/impl/rdbms/StandardRDBMSAdapter.java
  
  Index: StandardRDBMSAdapter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/stores/org/apache/slide/store/impl/rdbms/StandardRDBMSAdapter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StandardRDBMSAdapter.java 25 Nov 2003 13:21:21 -0000      1.6
  +++ StandardRDBMSAdapter.java 25 Nov 2003 14:27:42 -0000      1.7
  @@ -476,7 +476,7 @@
               try {
                   statement =
                       connection.prepareStatement(
  -                        "delete LOCKS from URI u where LOCK_ID = u.URI_ID and 
u.URI_STRING=?");
  +                        "delete LOCKS from LOCKS, URI u where LOCK_ID = u.URI_ID 
and u.URI_STRING=?");
                   statement.setString(1, lock.getLockId());
                   statement.executeUpdate();
               } finally {
  @@ -485,7 +485,7 @@
               try {
                   statement =
                       connection.prepareStatement(
  -                        "delete URI from LOCKS l where URI_ID = l.LOCK_ID and 
URI_STRING=?");
  +                        "delete URI from URI, LOCKS l where URI_ID = l.LOCK_ID and 
URI_STRING=?");
                   statement.setString(1, lock.getLockId());
               } finally {
                   close(statement);
  @@ -587,7 +587,7 @@
               NodeRevisionNumber revisionNumber = permission.getRevisionNumber();
               statement =
                   connection.prepareStatement(
  -                    "delete PERMISSIONS from URI ou, URI su, URI au where OBJECT_ID 
= ou.URI_ID and ou.URI_STRING = ? and SUBJECT_ID = su.URI_ID and su.URI_STRING = ? and 
ACTION_ID = au.URI_ID and au.URI_STRING = ? and VERSION_NO"
  +                    "delete PERMISSIONS from PERMISSIONS, URI ou, URI su, URI au 
where OBJECT_ID = ou.URI_ID and ou.URI_STRING = ? and SUBJECT_ID = su.URI_ID and 
su.URI_STRING = ? and ACTION_ID = au.URI_ID and au.URI_STRING = ? and VERSION_NO"
                           + getRevisionNumberAsWhereQueryFragement(revisionNumber));
               statement.setString(1, permission.getObjectUri());
               statement.setString(2, permission.getSubjectUri());
  @@ -606,7 +606,7 @@
           try {
               statement =
                   connection.prepareStatement(
  -                    "delete PERMISSIONS from URI u where OBJECT_ID = u.URI_ID and 
u.URI_STRING = ?");
  +                    "delete PERMISSIONS from PERMISSIONS, URI u where OBJECT_ID = 
u.URI_ID and u.URI_STRING = ?");
               statement.setString(1, uri.toString());
               statement.executeUpdate();
           } catch (SQLException e) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to