anchor.diff:  bulk_get_data_bag_items(Ids) ->
       bulk_get_objects(data_bag_item, Ids).
   
  --spec create_data_bag_item(#chef_data_bag_item{}) -> {ok, 1} | {error, term()}.
  -create_data_bag_item(#chef_data_bag_item{}=DataBagItem) ->
  -    create_object(DataBagItem).
  -
  --spec delete_data_bag_item(bin_or_string()) -> {ok, 1 | 'none' | 'not_found'} | {error, term()}.
  -delete_data_bag_item(DataBagItemId) when is_list(DataBagItemId) ->
  -    delete_data_bag_item(list_to_binary(DataBagItemId));
  -delete_data_bag_item(#chef_data_bag_item{id=DataBagItemId})->
  -    delete_data_bag_item(DataBagItemId);
  -delete_data_bag_item(DataBagItemId) when is_binary(DataBagItemId) ->
  -    delete_object(delete_data_bag_item_by_id, DataBagItemId).
  -
  --spec update_data_bag_item(#chef_data_bag_item{}) -> {ok, 1 | not_found} | {error, term()}.
  -update_data_bag_item(#chef_data_bag_item{last_updated_by = LastUpdatedBy,
  -                       updated_at = UpdatedAt,
  -                       serialized_object = Object,
  -                       id = Id}) ->
  -    UpdateFields = [LastUpdatedBy, UpdatedAt, Object, Id],
  -    do_update(update_data_bag_item_by_id, UpdateFields).
  -
   %%
   %% environment ops
   %%
  
positive.code: bulk_get_roles(Ids) ->
      bulk_get_objects(role, Ids).
  
  -spec create_role(#chef_role{}) -> {ok, 1} | {error, term()}.
  create_role(#chef_role{}=Role) ->
      create_object(Role).
  
  -spec delete_role(bin_or_string()) -> {ok, 1 | 'none' | 'not_found'} | {error, term()}.
  delete_role(RoleId) when is_list(RoleId) ->
      delete_role(list_to_binary(RoleId));
  delete_role(#chef_role{id=RoleId})->
      delete_role(RoleId);
  delete_role(RoleId) when is_binary(RoleId) ->
      delete_object(delete_role_by_id, RoleId).
  
  -spec update_role(#chef_role{}) -> {ok, 1 | not_found} | {error, term()}.
  update_role(#chef_role{last_updated_by = LastUpdatedBy,
                         updated_at = UpdatedAt,
                         serialized_object = Object,
                         id = Id}) ->
      UpdateFields = [LastUpdatedBy, UpdatedAt, Object, Id],
      do_update(update_role_by_id, UpdateFields).
  
  %%
  %% data_bag_item ops
  %%
  
  -spec fetch_data_bag_items(bin_or_string(), bin_or_string()) ->
                                    {ok, [binary()]} | {error, term()}.
  %% @doc Return list of data_bag_item names for a given organization
  fetch_data_bag_items(OrgId, DataBagName) ->
      RecordName = chef_data_bag_item,
      QueryName = list_query_for(RecordName),
      case sqerl:select(QueryName, [OrgId, DataBagName], rows_as_scalars, [item_name]) of
          {ok, L} when is_list(L) ->
              {ok, L};
          {ok, none} ->
              {ok, []};
          {error, Error} ->
              {error, Error}
      end.
  
  -spec fetch_data_bag_item_ids(bin_or_string(), bin_or_string()) ->
                                       {ok, [binary()]} | {error, term()}.
  
negative.code:          fetch_object_names/1,
  
           %%user ops
           count_user_admins/0,
  
           %% checksum ops
           mark_checksums_as_uploaded/2,
           non_uploaded_checksums/2,
  
           %% data_bag_item ops
           fetch_data_bag_item_ids/2,
           bulk_get_data_bag_items/1,
  
           %% environment ops
           bulk_get_environments/1,
  
           %% client ops
           bulk_get_clients/1,
  
           %% node ops
           bulk_get_nodes/1,
  
           %% role ops
           bulk_get_roles/1,
  
           %% cookbook version ops
           cookbook_exists/2,
  