karbarcca/SQLite.jl — pull request #20 by johnmyleswhite (2013-12-31 03:40:01+00:00)
Title: [WIP] Make SQLite.jl an implementation of the DBI protocol

This is a strange pull request.

It mostly removes functionality from the package and tries to steer it in a different direction that exposes much more of the low-level machinery of SQLite3 for users who want to work with SQLite3 as a general database more than as a tool for working with DataFrames.

In particular, the goal of the rewrite I've done is to standardize the SQLite3 package against a low-level database API that can be shared across every standard SQL database. The basic ideas for that cross-database API are implemented in https://github.com/johnmyleswhite/DBI.jl, which is heavily inspired by the Perl DBI module. Although Perl is clearly not widely used anymore, the Perl DBI did an amazing job of abstracting away database-specific details.

This pull request is still unfinished, but is largely functional already if you also grab the current master branch of DBI.jl and upgrade to the most recent version of SQLite3. The major changes that need to happen before this could be safely merged are described below:

* Determine which API's can be safely used with a recent, but not bleeding edge, SQLite3 release. I'm using the latest possible SQLite3 on my own system and have compiled it with optional support for useful API's that aren't available by default, including the `table_column_metadata` function.
* I need to move all of the existing SQLDF-style functionality into its own package, called something like SQLDF.jl.
* Provide methods for binding parameters to already prepared, but not yet executed, statements.
* Provide methods for determining whether the most recent SQL statement raised an error or succeeded

I have to fix DataFrames/DataArrays because it's now broken by recent changes, but I wanted to submit this PR to get feedback on the direction I've headed. If you're not happy with these changes, I'm happy to make a different package called something like DBDSQLite3.jl instead of breaking your package.