IreneKnapp / direct-sqlite

MIT License
35 stars 54 forks source link

A few minor improvements before the next release #15

Closed joeyadams closed 12 years ago

joeyadams commented 12 years ago

I'd like to slip these changes in before the next release, since there's a slight API change (sqlErrorDetails is now Text instead of Maybe Text).

A couple ideas taken from persistent-sqlite:

The last commit uses sqlite3_db_handle to get the Database of a Statement when a call fails and only a Statement is available. This eliminated all cases where no details were available, so I changed sqlErrorDetails from Maybe Text to Text.

nurpax commented 12 years ago

Looks good. Having an option for using system's SQLite binaries should make installation easier on Windows.

IreneKnapp commented 12 years ago

This is good stuff, although it should probably have been about three separate pull requests. Anyway, merged. :) Sorry for the delay, I've been busy!

nurpax commented 12 years ago

@joeyadams @IreneKnapp Joey, do you consider your merged changes complete enough for a new direct-sqlite release? It'd be great to get this code out. I'd at least like to switch sqlite-simple to use the latest version.

joeyadams commented 12 years ago

I'd say it's ready. Granted, we might want to make some changes later on (e.g. upgrade SQLite to 3.7.14, and fix a couple minor build warnings), but I think we should release first.

Current master (7649ce4) builds, and tests pass, with GHC 7.6.1 and cabal-install version 0.13.3. However, there are a few minor deprecation warnings. Thanks to the fix for GHC ticket 7167, "Module Prelude' does not exportcatch'" is a warning instead of an error.

@IreneKnapp, could you update the .cabal file to describe the new changes? I'm thinking something like:

[3.0] exports lower-level bindings, uses newtypes for parameter and column index types, throws SQL exceptions that can be caught, and uses Text instead of String even for non-data strings.

Also, could you update the homepage and bug-reports links to point to Github? The current bug-reports link gives a 403.