- Project tools
- How do I...
|Over 500 more tools...
[Catacomb] DBMS Abstraction added to Catacomb
FYI, I've checked in changes (merged from a branch) that fix a security
issue with executing arbitrary SQL statements and helps to make the SQL
code more maintainable by removing some of MySQL's specific API calls
from the dbms.c file. It is closely modelled on Java's JDBC API, where
SQL statements are prepared, parameters to the statement are set (and
escaped, as appropriate, to ensure safety) and execute is called to
actually run the SQL statement. This also provides an easy way to
"pre-prepare" a query and change individual parameters multiple times
without having to rebuild the query each time.
These changes follow the Apache coding style and best practices
(particularly in regards to memory pool management). The question is
still up in the air as to whether a (child) pool should be created for
each query or if it's better to just use the main pool for all queries.
(Currently the code does the former, each query will allocate a number
of character arrays of varying lengths.)
Next steps are to abstract the result retrieval, which will also likely
be modelled after the JDBC API. Once that has been completed, PostgreSQL
will be inches away!