anchor.diff:                                    {error, term()}.
   delete_sandbox(SandboxId) when is_binary(SandboxId) ->
       delete_object(delete_sandbox_by_id, SandboxId).
  -
   
   %% Checksum Operations
   
  
positive.code: -spec delete_checksums(OrgId::binary(),
                         CookbookVersionId::binary()) -> {ok, 1 } | {error, _}.
  delete_checksums(OrgId, CookbookVersionId) ->
      case sqerl:statement(delete_cookbook_checksums_by_orgid_cookbook_versionid,
                           [OrgId, CookbookVersionId]) of
          {ok, N} when is_integer(N) -> %% pretend there is 1
              {ok, 1};
          {ok, none} ->
              {ok, 1}; %% this is ok, there might be no checksums to delete
          {error, Error} ->
              {error, Error}
      end.
  
  %% @doc try and delete the row from cookbooks table.  It is protected by a
  %% ON DELETE RESTRICT from cookbook_versions so we get a FK violation if there
  
negative.code:                                                org_id=OrgId,
                                                 name=Name}) ->
      case delete_checksums(OrgId, CookbookVersionId) of
          {ok, DeletedChecksums} ->
              case delete_object(delete_cookbook_version_by_id, CookbookVersionId) of
                  {ok, 1} ->
                      case delete_cookbook_if_last(OrgId, Name) of
                          {ok, N} ->
                              {ok, N+1, DeletedChecksums};
                          Error = {error, _} ->
                              Error
                      end;
  