Blog

ClayDB Adapter Development

Posted by david on 16 June 2012 at 2:02 am

I've been working on a PostgreSQL adapter for ClayDB. I've only used PostgreSQL once before now and that was just to run a Xaraya installation for a client years ago. I never thought there was really a difference between MySQL and PostgreSQL. Wow was I wrong. PostgreSQL has some really interesting data types, including UUID, ARRAY, and lots of geometric data types. I don't know how I could possibly utilize all of the features in PostgreSQL and maintain any sanity within the ClayDB Adapter interface. It is a really interesting database and I'd like to experiment with it a lot more.

Working on the adapters for SQLite and PostgreSQL have made me realize the down side to having a simple Database Abstraction Layer and the features we have to sacrifice for the sake of being flexible. In the future I may take that into consideration when developing a next generation ClayDB library. Fortunately, if someone doesn't care to maintain compatibility with more than one database, they can still use ClayDB as a connection manager and PDO wrapper. ClayDB doesn't require adapters to implement the Adapter interface class, so one could create an adapter specifically taylored to any database engine and disregard any needs of any other adapters.

Anyway, I'm working on the PostgreSQL adapter. Once it's finished I plan to work on a MSSQL adapter, which will be tested with the SQL Express server. I hadn't planned on supporting any closed source databases, but I'm trying to open Clay up to as large of a user base as possible. MSSQL is very low on my priority list, as I will likely never use it. It's still on my list though, so yeah.

Comments

Log in to comment

No comments yet!