IreneKnapp/direct-sqlite — pull request #22 by joeyadams (2013-01-04 03:32:34+00:00)
Title: Add execPrint, lastInsertRowId, and other improvements

This pull request does several little things:

* Add `execPrint`, which prints result rows (sort of like the SQLite3 shell does). This is useful when experimenting in GHCi, as it lets you dump the contents of a table without having to prepare and step.

* Add `execWithCallback`, which gives a callback to [sqlite3_exec][3]. This is used to implement `execPrint`.

* Add the `interruptibly` combinator. It is used by `execPrint` so you can interrupt it with Ctrl+C in GHCi. It is rather expensive, though (~40 microseconds on my system).

* Add bindings for [sqlite3_last_insert_rowid][1] and [sqlite3_changes][2].

* Change the `Show` instance of the `Utf8` newtype for better correspondence with the `IsString` instance.

[1]: http://www.sqlite.org/c3ref/last_insert_rowid.html
[2]: http://www.sqlite.org/c3ref/changes.html
[3]: http://www.sqlite.org/c3ref/exec.html