HaskellDB is a great library for writing type-safe SQL queries. That type safety
comes with a significant boilerplate overhead, though. This library provides utilities
that help reduce that boilerplate by generating the definitions, types and instances
that HaskellDB expects to work with. It also provides some functions for building
records for projections which otherwise can be quite cumbersome.

Creates a compile-time field declaration. The name given
will be used to create the type and the name of the field returned. It
will also be used to create a field nameField function which
can be used to place the field in a projection.

For example, mkField "fooBar" [t|Int|] produces the following declarations:

Creates a compile time field declaration using the given
arguments for the type and column name of the field. The typN argument
is used to produce the field nameField function which can be used to
add the field to a projection.

Creates definitions for a table and all its fields in the style of DBDirect.
Takes a table name and a list of fields (as types). Generates
a table type and a function to construct the table. The function
will be the tablename in lower case. The type alias will
be the table name with the first character capitalized.

Creates definitions for a table and all its fields in the style of DBDirect.
Takes a table name and a list of fields (as types). Generates
a table type and a function to construct the table. The function
will be the tablename in lower case. The type alias will
be the table name with the first character capitalized. See mkDBirectTable for an example, as
that function calls this one.

Create a record from the list of tables and fields given. The first
element of each tuple is a table. The second is a list of fields from
that table which will be in the new record. The record will be constructed
in the order of tables and fields given.

This is a Template Haskell function which must be spliced in and is
intended to use the ' (quote) facility for capturing names. An example: