Closed joeyadams closed 11 years ago
This adds support for sqlite3_column_name, which returns the name of a result column. Example:
sqlite3_column_name
> import Database.SQLite3 > conn <- open ":memory:" > exec conn "CREATE TABLE foo (abc TEXT, d INT)" > stmt <- prepare conn "SELECT *, randomblob(32) FROM foo" > columnName stmt 0 Just "abc" > columnName stmt 1 Just "d" > columnName stmt 2 Just "randomblob(32)" > columnName stmt 3 Nothing
@nurpax: This might be an easy way to provide column information for conversion errors in sqlite-simple (https://github.com/nurpax/sqlite-simple/issues/20).
Very nice, thanks! I'll wait for this to be on hackage and then close out nurpax/sqlite-simple#20
Thanks for this! I'll do a hackage release in a few minutes when I have a real keyboard.
This adds support for
sqlite3_column_name
, which returns the name of a result column. Example:@nurpax: This might be an easy way to provide column information for conversion errors in sqlite-simple (https://github.com/nurpax/sqlite-simple/issues/20).