From: Matthew M. <ma...@tu...> - 2002-10-20 21:00:12
|
> Sorry I took so long to join in this thread. Weekend and all :) > > We currently have the pear database package in place. I think it would > be good for us in the long run if we rewrite a bit of code and implement > more of it's features. In the process this will fix the database > abstraction problem. This could also mean a change in how modules > create their tables (easy dump edit), but we can retain most of the > current API which should minimize editing module code. > > Thoughts? > No problems rewriting but only if it simplifies the current structure. The PEAR database package appears to be tool that stack on top of the DB class, which is the same thing we are doing, just in a different format. Looking at the PEAR package, it appears to ramp up difficulty to access the database. You have to create a new database class for each table, extend it to the PEAR package, define the table. Once you do all this, it does perform some neat tricks in that you can call rows with just the id, then edit the object itself. This could clean up code as it would separate the database data from the execution. For example, if you run the aforementioned sequence through testObject you will see that it is simply pulling the highest id number and incrementing it by one right before it inserts the row. This is exactly what sqlInsert does now. It appears to use the sequence functionality we would need to implement the entire database package. I'm not sure yet. I will need to test it personally before I give a thumbs up on rewriting the Database class so close to release. Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |