anchor.diff:                                             {error, term()}.
   bulk_get_environments(Ids) ->
       bulk_get_objects(environment, Ids).
  -
  --spec create_environment(#chef_environment{}) -> {ok, 1} | {error, term()}.
  -create_environment(#chef_environment{}=Environment) ->
  -    create_object(Environment).
  -
  --spec delete_environment(bin_or_string()) -> {ok, 1 | 'none' | 'not_found'} | {error, term()}.
  -delete_environment(EnvironmentId) when is_list(EnvironmentId) ->
  -    delete_environment(list_to_binary(EnvironmentId));
  -delete_environment(#chef_environment{id=EnvironmentId})->
  -    delete_environment(EnvironmentId);
  -delete_environment(EnvironmentId) when is_binary(EnvironmentId) ->
  -    delete_object(delete_environment_by_id, EnvironmentId).
  -
  --spec update_environment(#chef_environment{}) -> {ok, 1 | not_found} | {error, term()}.
  -update_environment(#chef_environment{last_updated_by = LastUpdatedBy,
  -                       updated_at = UpdatedAt,
  -                       name = Name,
  -                       serialized_object = Object,
  -                       id = Id}) ->
  -    UpdateFields = [LastUpdatedBy, UpdatedAt, Name, Object, Id],
  -    do_update(update_environment_by_id, UpdateFields).
   
   %%
   %% client ops
  
positive.code:         {error, Error} ->
              {error, Error}
      end.
  
  -spec create_client(#chef_client{}) -> {ok, 1} | {error, term()}.
  create_client(#chef_client{}=Client) ->
      create_object(Client).
  
  -spec delete_client(bin_or_string()) -> {ok, 1 | 'none' | 'not_found'} | {error, term()}.
  delete_client(ClientId) when is_list(ClientId) ->
      delete_client(list_to_binary(ClientId));
  delete_client(ClientId) when is_binary(ClientId) ->
      delete_object(delete_client_by_id, ClientId).
  
  -spec update_client(#chef_client{}) -> {ok, 1 | not_found} | {error, term()}.
  update_client(#chef_client{last_updated_by = LastUpdatedBy,
                             updated_at = UpdatedAt,
                             name = Name,
                             public_key = PublicKey,
                             pubkey_version = PubkeyVersion,
                             admin = IsAdmin,
                             validator = IsValidator,
                             id = Id}) ->
      UpdateFields = [LastUpdatedBy, UpdatedAt, Name,
                      PublicKey, PubkeyVersion,
                      IsValidator =:= true,
                      IsAdmin =:= true, Id],
      do_update(update_client_by_id, UpdateFields).
  
  %%
  %% data_bag ops
  %%
  
  -spec create_data_bag(#chef_data_bag{}) -> {ok, 1} | {error, term()}.
  create_data_bag(#chef_data_bag{}=DataBag) ->
      create_object(DataBag).
  
  -spec delete_data_bag(bin_or_string()) -> {ok, 1 | 'none' | 'not_found'} | {error, term()}.
  delete_data_bag(DataBagId) when is_list(DataBagId) ->
      delete_data_bag(list_to_binary(DataBagId));
  delete_data_bag(#chef_data_bag{id=DataBagId})->
      delete_data_bag(DataBagId);
  delete_data_bag(DataBagId) when is_binary(DataBagId) ->
      delete_object(delete_data_bag_by_id, DataBagId).
  
  -spec fetch_cookbook_versions(OrgId::object_id()) ->
      {ok, [versioned_cookbook()]} | {error, term()}.
  
negative.code: %% node ops
  %%
  
  -spec bulk_get_nodes([binary()]) -> {ok, [binary()] | not_found} |
                                      {error, term()}.
  bulk_get_nodes(Ids) ->
  