anchor.diff:                  State;
               {PortFD, closed} ->
                   State#{status => closed};
  +
               {'EXIT', PortFD, Reason} ->
                   ?error("CouchBase gateway's port ~p exited with reason: ~p", [State, Reason]),
                   State#{status => failed};
  
positive.code: -spec create(model_behaviour:model_config(), datastore:document()) ->
      {ok, datastore:ext_key()} | datastore:create_error().
  create(#model_config{bucket = Bucket} = _ModelConfig, #document{key = Key, value = Value}) ->
      case byte_size(term_to_binary(Value)) > 512 * 1024 of
          true -> error(term_to_big);
          false -> ok
      end,
  
      {Props} = to_json_term(Value),
      Doc = {[{<<"_id">>, to_driver_key(Bucket, Key)} | Props]},
  
negative.code: %%%-------------------------------------------------------------------
  %%% @doc CouchDB database driver (REST based) that supports changes stream
  %%%      and connecting to couchbase via couchbase's sync_gateway (that emulates CouchDB API).
  %%%      Values of document saved with this driver cannot be bigger then 512kB.
  %%% @end
  %%%-------------------------------------------------------------------
  -module(couchdb_datastore_driver).
  