Documentation

Given a SqlTypeId it returns a function f which transforms a
SqlValue into another type. The return type of f is dependent upon
the value of SqlTypeId. The function f is encapsulated in an
ExpQ. Also see toSqlTypeId.