anchor.diff:  %% API
   -export([all/0
           ,all_key/1
  -        ,find/1
           ,create_table/1
  +        ,find/2
           ,create/2
           ,update/2]).
   
  
positive.code:     [].
  
  %% Find document with given Id, assumes Id is unique
  -spec find(Id::binary()) -> jsx:json_term().
  find(_Id) ->
      <<>>.
  
  %% Create new table named Table
  -spec create_table(Table::binary()) -> ok | {error, Error::binary()}.
  
negative.code:     dikdik_db:simple_query(<<"CREATE TABLE ", Table/binary, " (id serial PRIMARY KEY, name varchar UNIQUE, data hstore)">>).
  
  %% Create new document with Id, assumes Id does not currently exist
  -spec create(Table::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  create(Table, Doc) ->
      [{K1, V1} | T] = jsx:decode(Doc),
      Values = << <<K1/binary, " => ", (jsx:encode(V1))/binary>>/binary,
                  << <<", ", K/binary, " => ", (jsx:encode(V))/binary >> || {K, V}  <- T >>/binary >>,
      dikdik_db:simple_query(<<"INSERT INTO ", Table/binary," (data) VALUES ('", Values/binary,"')">>).
  
  
  %% Update an already existing document at Id with new document
  -spec update(Id::binary(), Doc::jsx:json_text()) -> ok | {error, Error::binary()}.
  update(_Id, _Doc) ->
      ok.
  