Delete existing rows from a table.
321132
def delete(self, table, where=None):
        """"""
        if where:
            where_key, where_val = where
            query = "DELETE FROM {0} WHERE {1}='{2}'".format(wrap(table), where_key, where_val)
        else:
            query = 'DELETE FROM {0}'.format(wrap(table))
        self.execute(query)
        return True
199529
def remove(self, key):
        '''
        
        '''
        encodedKey = json.dumps(key)
        sql = 'DELETE FROM ' + self.table + ' WHERE name = %s'
        with self.connect() as conn:
            with doTransaction(conn):
                return executeSQL(conn, sql, args=[encodedKey])
701385
def delete_by_field(self, table: str, field: str, value: Any) -> int:
        """"""
        sql = ("DELETE FROM " + self.delimit(table) +
               " WHERE " + self.delimit(field) + "=?")
        return self.db_exec(sql, value)
157250
def _drop(self, table, existing_tables=None):
        """"""
        # Retrieve list of existing tables for comparison
        existing_tables = existing_tables if existing_tables else self.tables

        # Only drop table if it exists
        if table in existing_tables:
            # Set to avoid foreign key errorrs
            self.execute('SET FOREIGN_KEY_CHECKS = 0')

            query = 'DROP TABLE {0}'.format(wrap(table))
            self.execute(query)

            # Set again
            self.execute('SET FOREIGN_KEY_CHECKS = 1')
            self._printer('\tDropped table {0}'.format(table))
346069
public function truncate()
    {
        foreach ($this->tables as $table) {
            $this->db->query("DELETE FROM $table");
        }

        $this->tables = array();
    }
928541
def DropTables(self):
    """"""

    rows, _ = self.ExecuteQuery(
        "SELECT table_name FROM information_schema.tables "
        "WHERE table_schema='%s'" % self.database_name)
    for row in rows:
      self.ExecuteQuery("DROP TABLE `%s`" % row["table_name"])
893454
def delete(self):
        """"""
        self.__class__.objects.filter(pk=self.pk).delete()
326119
final public function delete()
    {
        $this->query->setStartDelete();

        $this->query->prepare()->bindWhere()->bindLimit()->execute();

        $this->setRowCount();

        $this->query->close();
    }
1228747
public function deleteAll()
    {
        $this->_db->createCommand()->truncateTable($this->tableName)->execute();
        $this->_data = [];

        $this->_cache->delete($this->cacheKey);
    }
1024179
def delete(self, name):
    '''
    
    '''
    conn = self._client.connect()
    conn.execute( self._table.delete().where(self._table.c.name==name) )
112049
def clear_db():
    """"""
    cursor = '0'
    while cursor != 0:
        cursor, keys = DB.scan(cursor, match='*', count=5000)
        if keys:
            DB.delete(*keys)
1304177
def delete(self, table):
        
        self._table = table
        self._limit = None
        self._query = "DELETE FROM {0}".format(self._table)

        return self
1173120
protected void deleteCurrentRowData() throws SQLException {
    //move data
    System.arraycopy(data, rowPointer + 1, data, rowPointer, dataSize - 1 - rowPointer);
    data[dataSize - 1] = null;
    dataSize--;
    lastRowPointer = -1;
    previous();
  }
292048
private void removeFromTable(Node[] table, Node node) {
    int last = table.length - 1;
    table[node.index] = table[last];
    table[node.index].index = node.index;
    table[last] = null;
  }
874651
def delete(self):
        
        (sql, ) = self._prepareSQL("DELETE")
        curs = self.cursor()
        curs.execute(sql, self._getID())
        curs.close()
        self.reset()
1346704
def delete(self,pool_or_cursor):
    ""
    vals=self.pkey_vals()
    whereclause=' and '.join('%s=%%s'%k for k in self.PKEY.split(','))
    q='delete from %s where %s'%(self.TABLE,whereclause)
    commit_or_execute(pool_or_cursor,q,vals)
1359563
def _delete(self):
        """"""
        try:
            for record in self._records:
                try:
                    self._records[record]._delete()
                except AttributeError:
                    pass
        except AttributeError:
            pass