anchor.diff:      ["SELECT ", FieldsSQL, " FROM ", Table,
        " ORDER BY ", OrderByStr].
   
  +%% @doc Generate a SELECT query for `RecName' rows.
  +%%
  +%% Example:
  +%% ```
  +%% SQL1 = sqerl_rec:gen_fetch(kitchen, name).
  +%% SQL1 = ["SELECT ", "id, name", " FROM ", "kitchens",
  +%%         " WHERE ", "name", " = $1"]
  +%%
  +%% SQL2 = sqerl_rec:gen_fetch(cook, [kitchen_id, name]),
  +%% SQL2 = ["SELECT ",
  +%%         "id, kitchen_id, name, auth_token, auth_token_bday, "
  +%%         "ssh_pub_key, first_name, last_name, email",
  +%%         " FROM ", "cookers", " WHERE ",
  +%%         "kitchen_id = $1 AND name = $2"]
  +%% '''
  +-spec gen_fetch(atom(), atom() | [atom()]) -> [string()].
   gen_fetch(RecName, By) when is_atom(By) ->
       AllFields = map_to_str(all_fields(RecName)),
       FieldsSQL = string:join(AllFields, ", "),
  
positive.code:     ["UPDATE ", Table, " SET ", KeyVals,
       " WHERE ", ByStr, " = ", LastParam].
  
  gen_insert(RecName) ->
      InsertFields = map_to_str(RecName:'#insert_fields'()),
      InsertFieldsSQL = string:join(InsertFields, ", "),
  
negative.code:      " WHERE ", OrderByStr, " > $1 ORDER BY ", OrderByStr,
       " LIMIT $2"].
  
  %% @doc Generate a query to return all rows
  %%
  %% Example:
  %% ```
  %% SQL = sqerl_rec:gen_fetch_all(kitchen, name),
  %% SQL = ["SELECT ", "id, name", " FROM ", "kitchens",
  %%        " ORDER BY ", "name"]
  %% '''
  -spec gen_fetch_all(atom(), atom()) -> [string()].
  gen_fetch_all(RecName, OrderBy) ->
      AllFields = map_to_str(all_fields(RecName)),
      FieldsSQL = string:join(AllFields, ", "),
  