anchor.diff:  
   %% Create new document with Name, assumes Name does not currently exist
   -spec insert(Table::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  -insert(Table, Doc) ->
  +insert(Table, Doc)
  +  when is_binary(Table),
  +       is_binary(Doc) ->
       Values = to_insert_vals(Doc),
       dikdik_db:simple_query(<<"INSERT INTO ", Table/binary," (id, data) VALUES (uuid_generate_v4(), '", Values/binary,"')">>).
   
   -spec insert(Table::binary(), Key::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  -insert(Table, Key, Doc) ->
  +insert(Table, Key, Doc)
  +  when is_binary(Table),
  +       is_binary(Key),
  +       is_binary(Doc) ->
       Values = to_insert_vals(Doc),
       dikdik_db:simple_query(<<"INSERT INTO ", Table/binary," (id, data) VALUES ('", Key/binary, "','", Values/binary,"')">>).
   
  
positive.code: 
  %% API
  -export([all/0
          ,all_key/2
          ,new/1
          ,lookup/2
          ,insert/2, insert/3
  
negative.code: all() ->
      [].
  
  %% Return all documents containing Key/Value pairs
  -spec match(Table::binary(), Pairs::[{Key::binary(), Value::binary()}]) -> [jsx:json_text()].
  match(Table, Pairs)
    when is_binary(Table),
         is_list(Pairs)->
      {WhereStr, WhereList} = build_where(Pairs),
      {{select, _Rows}, Results} =
          dikdik_db:extended_query(<<"SELECT %% hstore(data) FROM ", Table/binary,
                                     WhereStr/binary>>, WhereList),
      [jsx:encode(array_to_erl_json(X)) || {{array, X}} <- Results].
  
  %% Find document with given Id, assumes Id is unique
  -spec lookup(Table::binary(), Id :: binary()) -> jsx:json_text().
  lookup(Table, Id)
    when is_binary(Table),
         is_binary(Id) ->
      {{select, _Rows}, [{{array, Results}}]} =
          dikdik_db:extended_query(<<"SELECT %% hstore(data) FROM ", Table/binary,
                                     " WHERE id=$1">>, [Id]),
  