anchor.diff:          _ ->
               <<CookbookName/binary, "::", StrippedName/binary>>
       end.
  +
  +create_query() ->
  +    insert_cookbook_version.
  +
  +update_query() ->
  +    update_cookbook_version.
  +
  +delete_query() ->
  +    delete_cookbook_version_by_id.
  +
  +find_query() ->
  +    find_cookbook_version_by_orgid_name_version.
  +
  +list_query() ->
  +    list_cookbook_versions_by_orgid.
  +
  +bulk_get_query() ->
  +    error(not_implemented).
  +
  +update_from_ejson(#chef_cookbook_version{org_id = OrgId,
  +                                         authz_id = AuthzId,
  +                                         frozen = FrozenOrig} = CookbookVersion,
  +                  CookbookVersionData) ->
  +    UpdatedVersion = new_record(OrgId, AuthzId, CookbookVersionData),
  +    %% frozen is immutable once it is set to true
  +    Frozen = FrozenOrig =:= true orelse UpdatedVersion#chef_cookbook_version.frozen,
  +    CookbookVersion#chef_cookbook_version{frozen            = Frozen,
  +                                          meta_attributes   = UpdatedVersion#chef_cookbook_version.meta_attributes,
  +                                          meta_deps         = UpdatedVersion#chef_cookbook_version.meta_deps,
  +                                          meta_long_desc    = UpdatedVersion#chef_cookbook_version.meta_long_desc,
  +                                          metadata          = UpdatedVersion#chef_cookbook_version.metadata,
  +                                          checksums         = UpdatedVersion#chef_cookbook_version.checksums,
  +                                          serialized_object = UpdatedVersion#chef_cookbook_version.serialized_object}.
  +
  +ejson_for_indexing(#chef_cookbook_version{}, _CBV) ->
  +    error(not_indexed).
  
positive.code: 
  -behaviour(chef_object).
  
  -spec name(#chef_cookbook_version{}) -> binary().
  name(#chef_cookbook_version{name = Name}) ->
      Name.
  
negative.code:          parse_binary_json/2,
           parse_version/1,
           qualified_recipe_names/2,
           set_created/2,
           set_updated/2,
  
           type_name/1,
           update_from_ejson/2,
           version_to_binary/1
          ]).
  
  %% database named queries
  -export([
           bulk_get_query/0,
           create_query/0,
           delete_query/0,
           find_query/0,
           list_query/0,
           update_query/0
          ]).
  
  -ifdef(TEST).
  