Login | Register
My pages Projects Community openCollabNet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Catacomb] DBMS abstraction



All, I've finished the first pass at a DBMS abstraction layer that should be used instead of sprintf to compose queries...I've checked the files into CVS (the two file names are "dbms_mysql.c" and "dbms_mysql.h".)

Besides the major changes that will take place in dbms.c, I'll be adding a dbms component to the dav_repos_db struct (named "db"), the mysql component will be the same as *(db.mysql) so that there is consistency. (Should it be considered depricated?)

As for dbms.c, I'll work my way through the code and convert all of the queries to this new mechanism. I'll try to have this done by early next week, at the latest.

Some other comments/questions:

* is there a test suite I can use to make sure my changes don't break things? * I'm a bit rusty on the use of "const", and the dbms_mysql.c gives a warning regarding this...Dunno if that's really much of an issue or not. * The dbms struct carries it's own memory pool, should that be a child of another pool? Given that each query will be generating a fair number of string allocations, should each query have it's own child pool? I'm unclear as to when memory pools are cleaned up, so guidance (or URL's) would be appreciated. * coding style/variable naming comments are always appreciated, I can work with whatever style you like. (I often set my tab stops at 4, but I'll try to make sure it looks ok with 8.)

I plan on being at the interop event Tuesday afternoon and Wednesday, hope to see you there!