Drop any relations
501224
function (err, result) {
                            me.closeConnection(openConnection);
                            if (err) {
                                if (err.state !== '42S02') return cb(err);
                                result = [];
                            }
                            cb(null, result);
                        }
867108
protected function pruneRelationships()
    {
        $cli   = $this->climate();
        $ask   = $this->interactive();
        $dry   = $this->dryRun();
        $verb  = $this->verbose();
        $mucho = ($dry || $verb);

        $attach = $this->modelFactory()->get(Attachment::class);
        $pivot  = $this->modelFactory()->get(Join::class);
        $source = $attach->source();
        $db     = $source->db();

        $defaultBinds = [
            '%pivotTable' => $pivot->source()->table(),
            '%sourceType' => 'object_type',
            '%sourceId'   => 'object_id',
        ];

        $sql = 'SELECT DISTINCT `%sourceType` FROM `%pivotTable`;';
        $rows = $db->query(strtr($sql, $binds), PDO::FETCH_ASSOC);
        if ($rows->rowCount()) {
            error_log(get_called_class().'::'.__FUNCTION__);

            /** @todo Confirm each distinct source type */

            foreach ($rows as $row) {
                try {
                    $model = $this->modelFactory()->get($row['object_type']);
                } catch (Exception $e) {
                    unset($e);
                    $model = $row['object_type'];
                }

                if ($model instanceof ModelInterface) {
                    $sql = 'SELECT p.* FROM `%pivotTable` AS p
                            WHERE p.`%sourceType` = :objType AND p.`%sourceId` NOT IN (
                                SELECT o.`%objectKey` FROM `%objectTable` AS o
                            );';
                    $binds = array_merge($defaultBinds, [
                        '%objectTable' => $model->source()->table(),
                        '%objectKey'   => $model->key(),
                    ]);
                    $rows = $source->dbQuery(
                        strtr($sql, $binds),
                        [ 'objType' => $row['object_type'] ]
                    );

                    /** @todo Show found rows, confirm deletion of dead relationships */

                    /*
                    $sql = 'DELETE FROM `%pivotTable` AS p
                            WHERE p.`%sourceType` = :objType AND p.`%sourceId` NOT IN (
                                SELECT o.`%objectKey` FROM `%objectTable` AS o
                            );';
                    error_log('-- Delete Dead Objects: '.var_export($sql, true));
                    $source->dbQuery(
                        strtr($sql, $defaultBinds),
                        [ 'objType' => $model ]
                    );
                    */
                } elseif (is_string($model)) {
                    $sql  = 'SELECT p.* FROM `%pivotTable` AS p WHERE p.`%sourceType` = :objType;';
                    $rows = $source->dbQuery(
                        strtr($sql, $defaultBinds),
                        [ 'objType' => $model ]
                    );

                    /** @todo Explain missing model, confirm deletion of dead relationships */

                    /*
                    $sql = 'DELETE FROM `%pivotTable` WHERE `%sourceType` = :objType;';
                    error_log('-- Delete Dead Model: '.var_export($sql, true));
                    $source->dbQuery(
                        strtr($sql, $defaultBinds),
                        [ 'objType' => $model ]
                    );
                    */
                }
            }

            /*
            if (!$this->describeCount(
                $this->total,
                '%d dead objects were found.',
                '%d dead object was found.',
                'All objects are associated!'
            )) {
                return $this;
            }
            */

            $this->conclude();
        }

        return $this;
    }
1196425
@Override
    public void delete() {
        //Remove links to relations and return them
        Set<Relation> relations = castingsInstance().map(casting -> {
            Relation relation = casting.getRelation();
            Role role = casting.getRole();
            relation.unassign(role, this);
            return relation;
        }).collect(toSet());

        vertex().tx().cache().removedInstance(type().id());
        deleteNode();

        relations.forEach(relation -> {
            if (relation.type().isImplicit()) {//For now implicit relations die
                relation.delete();
            } else {
                RelationImpl rel = (RelationImpl) relation;
                rel.cleanUp();
            }
        });
    }
1142574
def _delete_single_relation(self, src, relation, dst):
        '''  '''
        self.__require_string__(relation)
        src_id = self._id_of(src)
        dst_id = self._id_of(dst)
        with self._write_lock:
            self._execute('''
                DELETE from relations where src=? and name=? and dst=?
            ''', (src_id, relation, dst_id))
            self.autocommit()
667629
def disconnect_all(self):
        ''''''
        with self._mutex:
            for conn in self.connections:
                self.object.disconnect(conn.id)
            self.reparse_connections()
1045844
@Override
    public boolean purgeRelationship(String pid,
                                     String relationship,
                                     String object,
                                     boolean isLiteral,
                                     String datatype) {
        LOG.debug("start: purgeRelationship");
        assertInitialized();
        try {
            MessageContext ctx = context.getMessageContext();
            return m_management.purgeRelationship(ReadOnlyContext
                                                          .getSoapContext(ctx),
                                                  pid,
                                                  relationship,
                                                  object,
                                                  isLiteral,
                                                  datatype);
        } catch (Throwable th) {
            LOG.error("Error purging relationships", th);
            throw CXFUtility.getFault(th);
        } finally {
            LOG.debug("end: purgeRelationship");
        }
    }
793281
public void removeExtension() {

		try {
			if (extendedRelationsDao.isTableExists()) {
				List<ExtendedRelation> extendedRelations = extendedRelationsDao
						.queryForAll();
				for (ExtendedRelation extendedRelation : extendedRelations) {
					geoPackage.deleteTable(extendedRelation
							.getMappingTableName());
				}
				geoPackage.dropTable(extendedRelationsDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Related Tables extension and table. GeoPackage: "
							+ geoPackage.getName(), e);
		}
	}
646908
def cleanup_relations(self):
        """"""
        collections = self.collections
        for relation in [x for col in collections.values()
                         for x in col.model.relations.values()]:
            db.session.query(relation)\
                       .filter(~relation.listing.any())\
                       .delete(synchronize_session=False)
        db.session.commit()
835191
function dropCollections (db, each, fn) {
  if (each && !fn) { fn = each; each = null }
  var conn = db.connection
    , cols = Object.keys(conn.collections)

  cols.forEach(function (name, k) {
    console.log('name: ', name, k)
    conn.collections[name].drop(function (err) {
      if (err == 'ns not found') {
        err = null
      }
      each && each(err, name)
    })
  })
  fn && fn(null)
}
316988
function clearDrops(sense) {
        sense.dropsStarted = [];
        sense.dropOver = null;
        sense.dropEvt = {
            dataType: 'text/plain',
            dataTransfer: ''
        };
    }
836022
def _drop_definition(self):
        """"""
        rId = self._sectPr.remove_headerReference(self._hdrftr_index)
        self._document_part.drop_header_part(rId)
482431
def _drop_definition(self):
        """"""
        rId = self._sectPr.remove_footerReference(self._hdrftr_index)
        self._document_part.drop_rel(rId)
42741
def only_to(self, status):
        
        from_relationships = self.get_relationships(status)
        to_relationships = self.get_related_to(status)
        return to_relationships.exclude(pk__in=from_relationships.values_list('pk'))
1072985
def drop(self):
        
        Statement = self.get_model('statement')
        Tag = self.get_model('tag')

        Statement.objects.all().delete()
        Tag.objects.all().delete()
197153
def drop():
    
    # Ensure the connection is up
    _State.connection()
    _State.table.drop(checkfirst=True)
    _State.metadata.remove(_State.table)
    _State.table = None
    _State.new_transaction()
757766
public function drop()
    {
        $conn = $this->connection->getConnection();
        $db = r\db($this->connection->getDatabaseName());
        $db->tableDrop($this->table)->run($conn);
    }
1318755
@Deprecated
    public void deleteIssueRelations(Issue redmineIssue) throws RedmineException {
        for (IssueRelation relation : redmineIssue.getRelations()) {
            deleteRelation(relation.getId());
        }
    }