remove from database (and delete aliases)
547603
def del_feed(name):
    """"""
    with Database("aliases") as aliases, Database("feeds") as feeds:
        if aliases[name]:
            proper_name = aliases[name]
        elif feeds[name]:
            proper_name = feeds[name]
        for k, v in aliases:
            if v == proper_name:
                del aliases[k]
        # deleted from aliases
        del feeds[proper_name]
621761
def delete(sql, *args, **kwargs):
        """"""
        assert "delete" in sql.lower(), 'This function requires a delete statement, provided: {}'.format(sql)
        CoyoteDb.execute_and_commit(sql, *args, **kwargs)
50977
static function cleanup()
    {
        $ini = eZINI::instance();
        $db = eZDB::instance();
        $timeFrame = 1;
        if ( $ini->hasVariable( 'TipAFriend', 'TimeFrame' ) )
            $timeFrame = $ini->variable( 'TipAFriend', 'TimeFrame' );
        $time = time() - $timeFrame * 3600;

        $db->query( "DELETE FROM eztipafriend_request
                      WHERE created < $time " );
    }
856251
public function removeDiscUser()
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $aRemoveGroups = $this->_getActionIds('oxobject2discount.oxid');
        if ($oConfig->getRequestParameter('all')) {
            $sQ = $this->_addFilter("delete oxobject2discount.* " . $this->_getQuery());
            \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
        } elseif ($aRemoveGroups && is_array($aRemoveGroups)) {
            $sQ = "delete from oxobject2discount where oxobject2discount.oxid in (" . implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aRemoveGroups)) . ") ";
            \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
        }
    }
1098758
def delete(self):
        """"""
        pipeline = self.db.pipeline()
        self._delete_from_indices(pipeline)
        self._delete_membership(pipeline)
        pipeline.delete(self.key())
        pipeline.execute()
397436
def delete_sql(table, filter):
    '''
    
    '''
    keys, values = _split_dict(filter)
    where = _pairs(keys)
    sql = 'DELETE FROM {} WHERE {}'.format(table, where)
    return sql, values
382287
public static function remove()
    {
        // load session config
        \Config::load('session', true);

        // prompt the user to confirm they want to remove the table.
        $iamsure = \Cli::prompt('Are you sure you want to delete the sessions table?', array('y','n'));

        // if they are sure, then let's drop it
        if ($iamsure === 'y')
        {
            \DBUtil::drop_table(\Config::get('session.db.table'));
            return \Cli::color('Session database table deleted.', 'green');
        }

        // if we made it to here, than that means the user said no.
        return \Cli::color('Session database table was not deleted.', 'red');
    }
235401
def delete(self, db_session=None):
        
        db_session = get_db_session(db_session, self)
        db_session.delete(self)
1037136
def delete_joined_table_sql(qualified_name, removing_qualified_name, primary_key):
    

    condition_template = 't.{}=d.{}'
    where_clause = ' AND '.join(condition_template.format(pkey, pkey)
                                for pkey in primary_key)
    delete_statement = (
        'DELETE FROM {table} t'
        ' USING {delete_table} d'
        ' WHERE {where_clause}').format(table=qualified_name,
                                        delete_table=removing_qualified_name,
                                        where_clause=where_clause)
    return delete_statement
826483
def delete(self, *names: str, pipeline=False):
        
        if pipeline:
            self._pipeline.delete(*names)
        else:
            self._db.delete(*names)
889633
def sql_reset(app, style, connection):
    ""
    return sql_delete(app, style, connection) + sql_all(app, style, connection)
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
924368
public static function cleanupDatabase()
    {
        // Grab any extensions sitting in the database
        $rows = Symphony::Database()->fetch("SELECT `name` FROM `tbl_extensions`");

        // Iterate over each row
        if (is_array($rows) && !empty($rows)) {
            foreach ($rows as $r) {
                $name = $r['name'];
                $status = isset($r['status']) ? $r['status'] : null;

                // Grab the install location
                $path = self::__getClassPath($name);
                $existing_id = self::fetchExtensionID($name);

                // If it doesnt exist, remove the DB rows
                if (!@is_dir($path)) {
                    Symphony::Database()->delete("tbl_extensions_delegates", sprintf(" `extension_id` = %d ", $existing_id));
                    Symphony::Database()->delete('tbl_extensions', sprintf(" `id` = %d LIMIT 1", $existing_id));
                } elseif ($status == 'disabled') {
                    Symphony::Database()->delete("tbl_extensions_delegates", sprintf(" `extension_id` = %d ", $existing_id));
                }
            }
        }
    }
1055348
public function delete()
    {
        $query = 'delete from '.$this->getTables($this->tables).' ';
        //
        $query .= ' '.$this->where;
        //
        $this->reset();
        //
        return Database::exec($query);
    }
1087377
def delete(self):
        
        resp = self.r_session.delete(self.database_url)
        resp.raise_for_status()
397001
public function removeScheduledAliases()
    {
        foreach ($this->scheduledRemoveAlias as $alias) {
            $this->aliasing->removeAlias($alias);
        }

        $this->scheduledRemoveAlias = [];
    }
961793
public void delete_device_alias(Database database, String alias)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        argIn.insert(alias);
        command_inout(database, "DbDeleteDeviceAlias", argIn);
    }