anchor.diff:              ensure_error(Error)
       end.
   
  +%% @doc Update record `Rec'. Uses the prepared query with name
  +%% `RecName_update'. Assumes an `id' field and corresponding column
  +%% which is used to find the row to update. The fields from `Rec'
  +%% passed as parameters to the query are determined by
  +%% `RecName:'#update_fields/0'.
   -spec update(db_rec()) -> ok | {error, _}.
   update(Rec) ->
       RecName = rec_name(Rec),
  
positive.code: bin_to_atom(B) ->
      erlang:binary_to_atom(B, utf8).
  
  -spec statements([atom()]) -> [{atom(), binary()}].
  statements(RecList) ->
      lists:flatten([ statements_for(RecName) || RecName <- RecList ]).
  
negative.code:     B;
  as_bin(S) ->
      erlang:iolist_to_binary(S).
  
  rec_name(Rec) ->
      erlang:element(1, Rec).
  