Truncate a table.

@return void
346069
public function truncate()
    {
        foreach ($this->tables as $table) {
            $this->db->query("DELETE FROM $table");
        }

        $this->tables = array();
    }
517596
def truncate_table(self, tablename):
        
        self.cursor.execute('TRUNCATE TABLE %s' %tablename)
        self.db.commit()
390838
public function dropAllTables()
    {
        $tables = [];

        $excludedTables = ['spatial_ref_sys'];

        foreach ($this->getAllTables() as $row) {
            $row = (array) $row;

            $table = reset($row);

            if (! in_array($table, $excludedTables)) {
                $tables[] = $table;
            }
        }

        if (empty($tables)) {
            return;
        }

        $this->connection->statement(
            $this->grammar->compileDropAllTables($tables)
        );
    }
137358
private void truncateTabs() {

        for (int i = 0; i < m_tabbedPanel.getTabCount(); i++) {
            if (m_tabbedPanel.getWidget(i) instanceof I_CmsTruncable) {
                I_CmsTruncable tab = (I_CmsTruncable)m_tabbedPanel.getWidget(i);
                tab.truncate(TM_GALLERY_DIALOG, m_width - 50);
            }
        }
    }
514204
def truncate(self, table):
        """"""
        if isinstance(table, (list, set, tuple)):
            for t in table:
                self._truncate(t)
        else:
            self._truncate(table)
1308747
public function truncate() {
		//connect to database
		$this->mapper->connect();
	
		//begin transaction
		$this->mapper->beginTransaction();
	
		//build query
		$query = $this->mapper->newQuery()
		->deleteFrom($this->entityProfile->getEntityTable());
			
		//run query
		$result = $query->exec();
	
		//commit
		$this->mapper->commit();
		return $result;
	}
1102471
public function truncateLaratrustTables()
    {
        DB::statement('SET FOREIGN_KEY_CHECKS = 0');
        DB::table('permission_role')->truncate();
        DB::table('permission_user')->truncate();
        DB::table('role_user')->truncate();
        \App\User::truncate();
        \Simoja\Laramin\Models\Role::truncate();
        \Simoja\Laramin\Models\Permission::truncate();
        DB::statement('SET FOREIGN_KEY_CHECKS = 1');
    }
752633
public function truncate() {
		$sql = $this->getSchema()->truncateSql($this->_connection);
		foreach ($sql as $snippet) {
			$this->_connection->execute($snippet);
		}
	}
948830
public function down() {
		Schema::drop(self::TABLE_DATA);
		Schema::drop(self::TABLE);
		Schema::drop(self::TABLE_ACTION);
	}
1190123
public function truncate(string $table): PDOStatement
	{
		$sql = $this->hasTruncate
			? 'TRUNCATE TABLE '
			: 'DELETE FROM ';

		$sql .= $this->quoteTable($table);

		$this->statement = $this->query($sql);
		return $this->statement;
	}
316490
public function truncate() {
        $json = $this->getClient()->delete('data/' . $this->getDataSet()->id);
        return (isset($json['success']) && $json['success']);
    }
511876
public function truncateTable()
    {
        $connection = $this->_em->getConnection();
        $dbPlatform = $connection->getDatabasePlatform();
        $connection->beginTransaction();
        try {
            $q = $dbPlatform->getTruncateTableSql($this->getSearchIndexTable());
            $connection->executeUpdate($q);
            $connection->commit();

            return true;
        } catch (\Exception $e) {
            $connection->rollback();

            return false;
        }
    }
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);
    }
492622
public function dropAllTables()
    {
        $tables = [];

        foreach ($this->getAllTables() as $row) {
            $row = (array) $row;

            $tables[] = reset($row);
        }

        if (empty($tables)) {
            return;
        }

        $this->disableForeignKeyConstraints();

        $this->connection->statement(
            $this->grammar->compileDropAllTables($tables)
        );

        $this->enableForeignKeyConstraints();
    }
592171
public function truncate() {
		$this->_map     = [];
		$this->_data    = [];
		$this->_models  = [];
		$this->_pointer = 0;
		
		return $this;
	}
242966
public function resetTable($table)
    {
        $data = $this->getDumpData();

        $this->executeQuery("TRUNCATE TABLE `$table`");
        if (isset($data[$table]["_sql_"])) {
            $this->executeQuery($data[$table]["_sql_"]);
        }
    }
605205
protected function _truncate()
    {
        if (!$this->getLimit()->isNull()) {
            if (is_null($this->getLimit()->getCount())) {
                $this->_output = array_splice($this->_output, $this->getLimit()->getStart());
            } else {
                $this->_output = array_splice($this->_output, $this->getLimit()->getStart(), $this->getLimit()->getCount());
            }
        }
    }