You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/05/17 22:42:43 UTC

svn commit: r1339856 - in /tcl/rivet/trunk: ChangeLog rivet/packages/dio/dio.tcl

Author: mxmanghi
Date: Thu May 17 20:42:42 2012
New Revision: 1339856

URL: http://svn.apache.org/viewvc?rev=1339856&view=rev
Log:
    * rivet/packages/dio/dio.tcl: fixed SQL syntax that would break compatibility with Oracle (fixes
    reopened bug #53222)


Modified:
    tcl/rivet/trunk/ChangeLog
    tcl/rivet/trunk/rivet/packages/dio/dio.tcl

Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1339856&r1=1339855&r2=1339856&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Thu May 17 20:42:42 2012
@@ -1,3 +1,8 @@
+2012-05-17 Massimo Manghi <mx...@apache.org>
+    * doc/xml/examples.xml: "Hello World" example reworked
+    * rivet/packages/dio/dio.tcl: fixed SQL syntax that would break compatibility with Oracle (fixes
+    reopened bug #53222)
+
 2012-05-15 Massimo Manghi <mx...@apache.org>
     * doc/hello1.rvt: add new "Hello World!" example to explain the new shorthand syntax <?= ... ?>
  

Modified: tcl/rivet/trunk/rivet/packages/dio/dio.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/dio/dio.tcl?rev=1339856&r1=1339855&r2=1339856&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/dio/dio.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/dio/dio.tcl Thu May 17 20:42:42 2012
@@ -235,13 +235,13 @@ proc handle {interface args} {
 	## If we're not using multiple keyfields, just return a simple
 	## where clause.
 	if {[llength $myKeyfield] < 2} {
-	    return " WHERE `${myKeyfield}` = [makeDBFieldValue $table $myKeyfield $myKey]"
+	    return " WHERE $myKeyfield = [makeDBFieldValue $table $myKeyfield $myKey]"
 	}
 
 	# multiple fields, construct it as a where-and
 	set req " WHERE 1 = 1"
 	foreach field $myKeyfield key $myKey {
-	    append req " AND `${field}` = [makeDBFieldValue $table $field $key]"
+	    append req " AND $field = [makeDBFieldValue $table $field $key]"
 	}
 	return $req
     }
@@ -547,7 +547,7 @@ proc handle {interface args} {
     #
     method delete {key args} {
 	table_check $args
-	set req "delete from `${myTable}`"
+	set req "DELETE FROM $myTable"
 	append req [build_key_where_clause $myKeyfield $key]
 
 	set res [exec $req]



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org