anchor.diff:  %%%
   
   -ifdef(TEST).
  --include_lib("eunit/include/eunit.hrl").
   
   helper_compile_def_to_module(SQL) ->
       Lexed = riak_ql_lexer:get_tokens(SQL),
  
positive.code:         false ->
              {error, <<"Must provide exactly one table name">>}
      end;
  build_sql_record(describe, SQL, _Cover) ->
      D = proplists:get_value(identifier, SQL),
      {ok, #riak_sql_describe_v1{'DESCRIBE' = D}};
  build_sql_record(insert, SQL, _Cover) ->
      T = proplists:get_value(table, SQL),
      case is_binary(T) of
          true ->
  
negative.code: replace_ast_timestamps(Mod, {Op, Item1, Item2}) when is_tuple(Item1) andalso is_tuple(Item2) ->
      {Op, replace_ast_timestamps(Mod, Item1), replace_ast_timestamps(Mod, Item2)};
  replace_ast_timestamps(Mod, {Op, FieldName, {binary, Value}}) ->
      {Op, FieldName, maybe_convert_to_epoch(catch Mod:get_field_type([FieldName]), Value, Op)};
  replace_ast_timestamps(_Mod, {Op, Item1, Item2}) ->
      {Op, Item1, Item2}.
  
  maybe_convert_to_epoch({'EXIT', _}, Value, _Op) ->
      {binary, Value};
  maybe_convert_to_epoch(timestamp, Value, '>') ->
      %% For strictly greater than, we increment any incomplete
      %% date/time strings by one "unit", where the unit is the least
      %% significant value provided by the user. "2016" becomes
      %% "2017". "2016-07-05T11" becomes "2016-07-05T12".
      Normal = timestamp_to_normalized(Value),
      Epoch = case jam:is_complete(Normal) of
                  true ->
                      to_epoch(Normal, 3);
                  false ->
                      to_epoch(jam:expand(jam:increment(Normal, 1), second), 3)
              end,
      case is_atom(Epoch) of
          true ->
              throw(Epoch);
          false ->
              {integer, Epoch}
      end;
  maybe_convert_to_epoch(timestamp, Value, _Op) ->
      Normal = timestamp_to_normalized(Value),
      Epoch = case jam:is_complete(Normal) of
                  true ->
                      to_epoch(Normal, 3);
                  false ->
                      to_epoch(jam:expand(Normal, second), 3)
              end,
      case is_atom(Epoch) of
          true ->
              throw(Epoch);
          false ->
              {integer, Epoch}
      end;
  maybe_convert_to_epoch(_Type, Value, _Op) ->
      {binary, Value}.
  
  %% I haven't investigated why the values are a nested list
  