Remove all tables from the database.
964298
public function cleanup()
    {
        $this->db->begin();
        $rslt = $this->db->query( 'SELECT * FROM SQLITE_MASTER' );
        $rslt->setFetchMode( PDO::FETCH_NUM );
        $rows = $rslt->fetchAll();
        foreach ( $rows as $row )
        {
            $table = $row[0];
            $this->db->exec( "DROP TABLE `$table`" );
        }
        $this->db->commit();
    }
876816
def tear_down(self):
        
        # drop/delete the tables
        logger.info('resetting database...')
        BASE.metadata.drop_all(self.engine)
        return self
1311765
public function clearAllData()
    {
        if (!$this->isUsed()) {
            return;
        }

        $this->getConn()->clearAllData();

        // Some DataExtensions keep a static cache of information that needs to
        // be reset whenever the database is cleaned out
        $classes = array_merge(
            ClassInfo::subclassesFor(DataExtension::class),
            ClassInfo::subclassesFor(DataObject::class)
        );
        foreach ($classes as $class) {
            $toCall = array($class, 'on_db_reset');
            if (is_callable($toCall)) {
                call_user_func($toCall);
            }
        }
    }
955538
public void free()
    {
        this.setPDatabaseParent(null); // Remove from database
        
        Object[] keys = m_htTableList.keySet().toArray();
        for (int i = 0; i < keys.length; i++)
        { 
            Object key = keys[i];
            PTable pTable = m_htTableList.get(key);
            if (pTable != null)
                pTable.free();      // This can be dangerous if the PhysicalTables still have references to the PTables
        } 
        m_htTableList.clear();
        m_htTableList = null;
        this.close();
    }
336388
def flush(self):
        """"""
        keys = list(self.keys())
        if keys:
            return self.database.delete(*keys)
287798
def clear_table(dbconn, table_name):
    
    cur = dbconn.cursor()
    cur.execute("DELETE FROM '{name}'".format(name=table_name))
    dbconn.commit()
346069
public function truncate()
    {
        foreach ($this->tables as $table) {
            $this->db->query("DELETE FROM $table");
        }

        $this->tables = array();
    }
112049
def clear_db():
    """"""
    cursor = '0'
    while cursor != 0:
        cursor, keys = DB.scan(cursor, match='*', count=5000)
        if keys:
            DB.delete(*keys)
440135
private static void removeAll(Connection conn, ArrayList<String> usedTables) {
	int len = usedTables.size();

	for (int i = 0; i < len; i++) {

	    String tableName = usedTables.get(i).toString();
	    // print.out("remove:"+tableName);
	    try {
		removeTable(conn, tableName);
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}
    }
835844
public static void destroyAll() {
        for (Map.Entry<ServerConfig, ProtocolConfig> entry : SERVER_MAP.entrySet()) {
            entry.getValue().destory();
        }
        try {
            ProtocolConfig.destroyAll();
        } catch (Exception e) {
            // NOPMD
        }
    }
970479
public void removeAll()
    {
        if (m_aRecords != null)
        {
            for (int iArrayIndex = 0; iArrayIndex < MAX_RECORD_ARRAY_SIZE; iArrayIndex++)
            {   // Free the objects that are no longer used
                this.freeElement(m_aRecords[iArrayIndex]);
                m_aRecords[iArrayIndex] = null;
            }
            m_aRecords = null;
        }
        m_iRecordListStep = 1;
        m_iRecordListEnd = 0;
        m_iRecordListMax = 0; // Current size of the record list (records scanned) (-1 - unknown)
    }
1166087
@SafeVarargs
  public static void deleteAll(Table... tables) {
    foreach(tables, DBSetup::deleteAll, CallInfo.create());
  }
1058755
protected function cleanupDB()
    {
        $eresus = Eresus_CMS::getLegacyKernel();
        $tables = $eresus->db
            ->query_array("SHOW TABLES LIKE '{$eresus->db->prefix}{$this->getName()}_%'");
        $tables = array_merge($tables, $eresus->db->
            query_array("SHOW TABLES LIKE '{$eresus->db->prefix}{$this->getName()}'"));
        for ($i = 0; $i < count($tables); $i++)
        {
            $this->dbDropTable(substr(current($tables[$i]), strlen($this->getName()) + 1));
        }
    }
1046401
def wipe_db(self):
        """"""
        logger.warning("Wiping the whole database")
        self.client.drop_database(self.db_name)
        logger.debug("Database wiped")
447447
def removeAll(self):
        
        before_len = len(self.model.db)
        self.model.db = []
        if not self._batch.enable.is_set():
            self.model.save_db()
        return before_len - len(self.model.db)
1156740
def clearAll(self):
        
        # clear the tree information
        self.clear()
        
        # clear table information
        self._tableTypeName  = ''
        self._tableType      = None
        
        # clear the records information
        self._recordSet         = None
        self._currentRecordSet  = None
        
        # clear lookup information
        self._query             = None
        self._order             = None
        self._groupBy           = None
        
        # clear paging information
        
        if not self.signalsBlocked():
            self.recordsChanged.emit()
799684
public function removeAll()
    {
        $classMetaData = $this->entityManager->getClassMetadata($this->getEntityClassName());
        $connection = $this->entityManager->getConnection();
        $databasePlatform = $connection->getDatabasePlatform();
        $truncateTableQuery = $databasePlatform->getTruncateTableSql($classMetaData->getTableName());
        $connection->executeUpdate($truncateTableQuery);
    }