Empty a table by deleting all of its rows.
514204
def truncate(self, table):
        """"""
        if isinstance(table, (list, set, tuple)):
            for t in table:
                self._truncate(t)
        else:
            self._truncate(table)
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;
  }
1247797
public function EmptyTable($Table = '') {
      if ($Table == '') {
         if (!isset($this->_Froms[0]))
            return FALSE;

         $Table = $this->_Froms[0];
      } else {
         $Table = $this->EscapeIdentifier($this->Database->DatabasePrefix.$Table);
      }


      $Sql = $this->GetDelete($Table);
      
      return $this->Query($Sql, 'delete');
   }
78500
static function cleanAll()
    {
        $db = eZDB::instance();
        $definition = eZISBNRegistrantRange::definition();
        $table = $definition['name'];
        $sql = "TRUNCATE TABLE " . $table;
        $db->query( $sql );
    }
188429
def clear(self):
        
        self.grid = [[EMPTY for dummy_col in range(self.grid_width)] for dummy_row in range(self.grid_height)]
287798
def clear_table(dbconn, table_name):
    
    cur = dbconn.cursor()
    cur.execute("DELETE FROM '{name}'".format(name=table_name))
    dbconn.commit()
1026512
def delete(self, row):
        """"""
        i = self._get_key_index(row)
        del self.keys[i]
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))
1266407
def drop_empty_tables(self):
        """"""
        # Count number of rows in each table
        counts = self.count_rows_all()
        drops = []

        # Loop through each table key and validate that rows count is not 0
        for table, count in counts.items():
            if count < 1:
                # Drop table if it contains no rows
                self.drop(table)
                drops.append(table)
        return drops
447535
def delete_rows(self, row, no_rows=1):
        """"""

        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        tab = self.grid.current_table

        try:
            self.code_array.delete(row, no_rows, axis=0, tab=tab)

        except ValueError, err:
            post_command_event(self.main_window, self.StatusBarMsg,
                               text=err.message)
336388
def flush(self):
        """"""
        keys = list(self.keys())
        if keys:
            return self.database.delete(*keys)
1188808
public function deleteAll() {

        $tablenames = $this->getAllTableNames();
        foreach ($tablenames as $tablename) {
            $this->databaseConnection->query("DROP TABLE " . $tablename);
        }

    }
951599
def delete(self):
        
        table_client = self._instance._client.table_admin_client
        table_client.delete_table(name=self.name)
1113360
def flush(self, table):
        '''
        
        '''
        table_path = os.path.join(self.db_path, table)
        if os.path.exists(table_path):
            os.unlink(table_path)
106570
def clear(**kwargs):
    

    database = kwargs.pop('database', False)
    expression = lambda target, table: table.drop(target)
    test = lambda x, tab: not database_exists(x.url) or not tab.exists(x)

    # TODO: Iterate through all engines in name set.
    if database and database_exists(engine['default'].url):
        drop_database(engine['default'].url)
        clear_cache()

    op(expression, reversed(metadata.sorted_tables), test=test,
       primary='clear', secondary='drop', **kwargs)
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
918279
def delete_all(self): 
        
        for record in self.find(using_name=False, data_only=True):
            res = self.delete_one(record["id"])