MDB2 Database Support

Went back to using MDB2 as a database abstraction layer for Nexista today during some PBooks tests and I'm happy to say that the sql datasource "driver" is working pretty well. A couple of errors:
  • Not sure how to handle null values yet
  • Had to figure out how to give Nexista's error message system the error message from PEAR, so now when there's a problem, I can be alerted. The getMessage function isn't too detailed though, I may fish around to find how to get the userinfo output without having to patch getMessage.
So that's a pretty big win for Nexista, but the mdb2 interface still needs to be extensively tested. PBooks will be a good candidate for that as I'm planning on doing a lot of testing on it as well. UPDATE: On through day two of MDB2 testing and everything is working OK. I've even got it working on FreeBSD. Since MDB2 is actively maintained, I'll likely switch to using it instead of metabase for good. As I keep saying, I'm interested in trying out and supporting PDO as well. UPDATE 2: I've been wondering whether to use persistent connections with these database abstraction layers, and I've decided against it. It doesn't help much, and for CGI setups, they can't be used. However, I did make a change to the MDB2 SQL data source to close the connection after each query, instead of after the end of the script. This will reduce the overall number of connections at any given time. For more on this subject, read this.I've been thinking a lot about caching lately, and it probably makes sense to use a memory based caching system at some point, like xcache or memcache. I've had this running before, and it worked great.UPDATE 3: I think PDO support will be added soon with a minimal amount of effort. Cool!
By Albert on August 2, 2007 3:49 PM