anchor.diff:  %% is equal to the view name.
   %% @end
   %%--------------------------------------------------------------------
  --spec save_spatial_view_doc(ctx(), view(), binary()) -> ok | {error, term()}.
  -save_spatial_view_doc(Ctx, ViewName, Function) ->
  -    EJson = {[{<<"spatial">>, {[{
  -        ViewName, Function
  -    }]}}]},
  +-spec save_spatial_view_doc(ctx(), view(), binary(), view_creation_opts()) -> ok | {error, term()}.
  +save_spatial_view_doc(Ctx, ViewName, Function, Opts) ->
  +    EJson = {[
  +        {<<"spatial">>, {[
  +            {ViewName, Function}
  +        ]}},
  +        {<<"options">>, {[
  +            {<<"updateMinChanges">>, proplists:get_value(update_min_changes, Opts, ?UPDATE_MIN_CHANGES)},
  +            {<<"replicaUpdateMinChanges">>, proplists:get_value(replica_update_min_changes, Opts, ?REPLICA_UPDATE_MIN_CHANGES)}
  +        ]}}
  +    ]},
       save_design_doc(Ctx, ViewName, EJson).
   
   %%--------------------------------------------------------------------
  
positive.code: -export([save/1, save/3, get/2, delete/2]).
  -export([get_counter/2, get_counter/3, update_counter/4]).
  -export([save_design_doc/3, get_design_doc/2, delete_design_doc/2]).
  -export([save_view_doc/3, save_spatial_view_doc/3, query_view/4]).
  
  -type ctx() :: #{bucket := couchbase_config:bucket(),
                   pool_mode => couchbase_pool:mode(),
  
negative.code: 
  -export_type([ctx/0, key/0, value/0, item/0, design/0, view/0, view_opt/0]).
  
  -define(UPDATE_MIN_CHANGES, 5000).
  -define(REPLICA_UPDATE_MIN_CHANGES, 5000).
  
  %%%===================================================================
  %%% API
  %%%===================================================================
  