Changeset 410
- Timestamp:
- 1/15/2007 10:00:55 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 modified
-
cfeclipse.properties (added)
-
config/reactor.xml (modified) (1 diff)
-
create distribution package.bat (modified) (1 diff)
-
reactor/iterator/iterator.cfc (modified) (5 diffs)
-
reactor/util/ObjectCache.cfc (added)
-
testDb.cfm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/reactor.xml
r303 r410 2 2 <config> 3 3 <project value="Scratch" /> 4 <dsn value="scratch Mysql5" />5 <type value="m ysql" />4 <dsn value="scratch" /> 5 <type value="mssql" /> 6 6 <mapping value="/reactorData" /> 7 <mode value=" always" />7 <mode value="production" /> 8 8 <!-- These config values are not required --> 9 9 <!-- <username value="" /> -
trunk/create distribution package.bat
r303 r410 6 6 svn export http://svn.reactorframework.com/reactor/trunk/reactor "C:\Inetpub\Reactor For ColdFusion\distribute\Reactor" --force 7 7 svn export http://svn.reactorframework.com/reactor/trunk/ReactorSamples "C:\Inetpub\Reactor For ColdFusion\distribute\ReactorSamples" --force 8 svn export http://svn.reactorframework.com/reactor/trunk/Documentation "C:\Inetpub\Reactor For ColdFusion\distribute\Documentation" --force8 svn export http://svn.reactorframework.com/reactor/trunk/Documentation/Documentation/!SSL! "C:\Inetpub\Reactor For ColdFusion\distribute\Documentation" --force 9 9 10 10 echo Reactor Version Information > "C:\Inetpub\Reactor For ColdFusion\distribute\version.txt" -
trunk/reactor/iterator/iterator.cfc
r408 r410 147 147 <cfset var field = "" /> 148 148 <cfset var To = "" /> 149 <cfset var useTransaction = true /> 150 <cfset var args = StructNew() /> 151 152 <!--- this is a bit of a hack to manage deleting in a manual transaction ---> 153 <cfif StructKeyExists(arguments, "useTransaction")> 154 <cfset useTransaction = arguments.useTransaction /> 155 <cfset structDelete(arguments, "useTransaction") /> 156 <cfset fieldList = ListDeleteAt(fieldList, ListFind(fieldList, "useTransaction")) /> 157 </cfif> 149 158 150 159 <cfif NOT StructCount(arguments)> … … 160 169 <cfif getLinked()> 161 170 <!--- this obeject is in a linked iterator. we need to delete the object that acts as the midpoint between the parent and this object being deleted ---> 162 <cfset Record._getParent().delete( ) />171 <cfset Record._getParent().delete(useTransaction=useTransaction) /> 163 172 <cfelse> 164 173 <!--- delete the record ---> 165 <cfset Record.delete( ) />174 <cfset Record.delete(useTransaction=useTransaction) /> 166 175 </cfif> 167 176 … … 201 210 202 211 <!--- this object is in a linked iterator. we need to delete the object that acts as the midpoint between the parent and this object being deleted ---> 203 <cfset Record[1]._getParent().delete( ) />212 <cfset Record[1]._getParent().delete(useTransaction=useTransaction) /> 204 213 <cfelse> 205 214 <!--- delete the record ---> 206 <cfset Record.delete( ) />215 <cfset Record.delete(useTransaction=useTransaction) /> 207 216 </cfif> 208 217 … … 219 228 <cfloop from="1" to="#ArrayLen(indexArray)#" index="x"> 220 229 <!--- delete the record ---> 221 <cfset delete(indexArray[x]) /> 230 <cfset args[1] = indexArray[x] /> 231 <cfset args["useTransaction"] = useTransaction /> 232 233 <cfset delete(argumentCollection=args) /> 222 234 </cfloop> 223 235 </cfif> … … 229 241 <!--- deleteAll ---> 230 242 <cffunction name="deleteAll" access="public" hint="I delete all elements in this iterator" output="false" returntype="void"> 243 <cfargument name="useTransaction" hint="I indicate if this save should be executed within a transaction." required="no" type="any" _type="boolean" default="true" /> 231 244 <cfset var Array = getArray() /> 232 245 <cfset var x = 0 /> 246 <cfset var args = StructNew() /> 233 247 234 248 <cfloop from="#ArrayLen(Array)#" to="1" index="x" step="-1"> 235 <cfset delete(x) /> 249 <cfset args[1] = x /> 250 <cfset args["useTransaction"] = useTransaction /> 251 <cfset delete(argumentCollection=args) /> 236 252 </cfloop> 237 253 </cffunction> -
trunk/testDb.cfm
r303 r410 1 1 2 <cfset reactorFactory = CreateObject("Component", "reactor.reactorFactory") /> 2 3 <cfset reactorFactory.init("/config/reactor.xml") /> 3 4 4 <cfset record = reactorFactory.createRecord("test") /> 5 <cfdump var="#record#" /><cfabort> 5 <cfset CustomerGateway = reactorFactory.createGateway("Customer") /> 6 7 <cfset total = 0 /> 8 <cfloop from="1" to="30" index="x"> 9 <cfset tick = getTickCount() /> 10 <cfset CustomerGateway.test() /> 11 <cfset total = total + (getTickCount()-tick) /> 12 </cfloop> 13 14 avg: <cfdump var="#total/30#" />

