cvmfs/catalog_rw.cc
void WritableCatalog::RemoveNestedCatalog(const string &mountpoint,
                                          Catalog **attached_reference)
{
  hash::Any dummy;
  bool retval = FindNested(PathString(mountpoint.data(), mountpoint.length()),
                           &dummy);
  assert(retval);

  Sql stmt(database(),
           "DELETE FROM nested_catalogs WHERE path = :p;");
  retval =
    stmt.BindText(1, mountpoint) &&
    stmt.Execute();
  assert(retval);

  // If the reference was successfully deleted, we also have to check whether
  // there is also an attached reference in our in-memory data.
  // In this case we remove the child and return it through **attached_reference
  Catalog *child = FindChild(PathString(mountpoint.data(),
                                        mountpoint.length()));
  if (child != NULL)
    RemoveChild(child);
  if (attached_reference != NULL)
    *attached_reference = child;

  delta_counters_.d_self_nested--;
}
/**
 * Remove a nested catalog reference from the database.
 * If the catalog 'mountpoint' is currently attached as a child, it will be
 * removed, too (but not detached).
 * @param[in] mountpoint the mountpoint of the nested catalog to dereference in
              the database
 * @param[out] attached_reference is set to the object of the attached child or
 *             to NULL
 * @return true on success, false otherwise
 */
Remove a nested catalog reference from the database.
If the catalog 'mountpoint' is currently attached as a child, it will be
removed, too (but not detached).
@param[in] mountpoint the mountpoint of the nested catalog to dereference in
the database
@param[out] attached_reference is set to the object of the attached child or
to NULL
@return true on success, false otherwise
Remove a nested catalog reference from the database . If the catalog ' mountpoint ' is currently attached as a child it will be removed too ( but not detached ) . @param [ in ] mountpoint the mountpoint of the nested catalog to dereference in the database @param [ out ] attached_reference is set to the object of the attached child or to NULL @return true on success false otherwise
void WritableCatalog::RemoveNestedCatalog(const string &mountpoint,
                                          Catalog **attached_reference)
{
  hash::Any dummy;
  bool retval = FindNested(PathString(mountpoint.data(), mountpoint.length()),
                           &dummy);
  assert(retval);
  Sql stmt(database(),
           "DELETE FROM nested_catalogs WHERE path = :p;");
  retval =
    stmt.BindText(1, mountpoint) &&
    stmt.Execute();
  assert(retval);
  Catalog *child = FindChild(PathString(mountpoint.data(),
                                        mountpoint.length()));
  if (child != NULL)
    RemoveChild(child);
  if (attached_reference != NULL)
    *attached_reference = child;
  delta_counters_.d_self_nested--;
}
void WritableCatalog :: RemoveNestedCatalog ( const string & mountpoint , Catalog * * attached_reference ) { hash :: Any dummy ; bool retval = FindNested ( PathString ( mountpoint . data ( ) , mountpoint . length ( ) ) , & dummy ) ; assert ( retval ) ; Sql stmt ( database ( ) , " " ) ; retval = stmt . BindText ( 1 , mountpoint ) && stmt . Execute ( ) ; assert ( retval ) ; Catalog * child = FindChild ( PathString ( mountpoint . data ( ) , mountpoint . length ( ) ) ) ; if ( child != NULL ) RemoveChild ( child ) ; if ( attached_reference != NULL ) * attached_reference = child ; delta_counters_ . d_self_nested -- ; }
Remove a nested catalog reference from the database.
Remove a nested catalog reference from the database .
// If the reference was successfully deleted, we also have to check whether // there is also an attached reference in our in-memory data. // In this case we remove the child and return it through **attached_reference