DbExchange

The DbExchange class is used to track the VO instances that have been instantiated (specifically new, updated, & deleted VOs). The class maintains arrays of the objects that have been created during script execution. The modifications are performed in the background (mostly).

When various different stages of script completion are reached, you can call on the DbExchange to perform the accumulated database operations all at once (with the exception of the SELECTs). The operations can be performed by type, or just perform all of them.

The following script(s) utilize the other VoDaoDb classes to perform their intended purposes. The contents of the DbExchange are echoed throughout so that you can follow the changes being performed. Note the use of "mark???()" methods, as opposed to the "???Now()" methods used on the Value Objects, on the VOs. Either method can be used, but the DbExchange does accumulate the changes before they're committed to the database. This helps to save trips to the database. Contrarily, the "???Now()" methods will perform the database synchronization immediately even if the object is modified or deleted again before the script exits.

VoDaoDb Class “C.R.U.D.” Tests

Line #41

(C = Create) Object Creation Tests

Line #177

(R = Read) Object Selection Tests

Line #307

(U = Update) Object Modification Tests

Line #383

(D = Delete) Object Deletion Tests

End of Script