anchor.diff:         is_binary(Id),
          is_binary(Doc) ->
       Values = to_insert_vals(Doc),
  -    {{insert, _}, _} =
  +    {{insert, _, _}, _} =
           dikdik_db:simple_query(<<"INSERT INTO ", Table/binary," (id, data) VALUES ('", Id/binary, "','", Values/binary,"')">>).
   
   %% Replace an already existing document at Id with new document
  
positive.code:   when is_binary(Table),
         is_binary(Doc) ->
      Values = to_insert_vals(Doc),
      {{insert, _}, _} = 
          dikdik_db:simple_query(<<"INSERT INTO ", Table/binary," (id, data) VALUES (uuid_generate_v4(), '",Values/binary,"')">>).
  
  -spec insert(Table::binary(), Id::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  
negative.code:     [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() | {error, no_doc}.
  lookup(Table, Id)
    when is_binary(Table),
         is_binary(Id) ->
      case dikdik_db:extended_query(<<"SELECT %% hstore(data) FROM ", Table/binary,
                                      " WHERE id=$1">>, [Id]) of
          {{select, _Rows}, [{{array, Results}}]} ->            
              jsx:encode(array_to_erl_json(Results));
          {{select, 0}, []} ->
              {error, no_doc}
      end.    
  
  %% Create new document with Name, assumes Name does not currently exist
  -spec insert(Table::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  