Truncate all existing tables in current keyspace.

        :returns: an empty list
184649
def sql_flush(self, style, tables, sequences, allow_cascade=False):
        

        for table in tables:
            qs = "TRUNCATE {}".format(table)
            self.connection.connection.execute(qs)

        return []
517596
def truncate_table(self, tablename):
        
        self.cursor.execute('TRUNCATE TABLE %s' %tablename)
        self.db.commit()
62940
@Override
    public final void truncate(ClusterName targetCluster, TableName tableName) throws UnsupportedException,
            ExecutionException {

        try {

            connectionHandler.startJob(targetCluster.getName());
            if (logger.isDebugEnabled()) {
                logger.debug(
                        "Tuncating table [" + tableName.getName() + "] in cluster [" + targetCluster.getName() + "]");
            }
            truncate(tableName, connectionHandler.getConnection(targetCluster.getName()));
            if (logger.isDebugEnabled()) {
                logger.debug("The table [" + tableName.getName() + "] has been successfully truncated in cluster ["
                        + targetCluster.getName() + "]");
            }
        } finally {
            connectionHandler.endJob(targetCluster.getName());
        }
    }
976946
def drop_all(self):
        '''  '''
        self.drop(self.get_table_names())
        if self.persistent:
            with self._lock:
                try:
                    dbfolder = os.path.join(self.root_dir, self.name)
                    if os.path.exists(dbfolder) and not os.listdir(dbfolder):
                        rmtree(dbfolder)
                except (IOError, WindowsError):
                    self._print('Failed to delete folder %s when dropping database' % self.name)
                finally:
                    del self
1026147
def drop(self, table):
        
        existing_tables = self.tables
        if isinstance(table, (list, set, tuple)):
            for t in table:
                self._drop(t, existing_tables)
        else:
            self._drop(table, existing_tables)
        return table
43241
def drop_all_tables(self):
        """"""
        for table_name in self.table_names():
            self.execute_sql("DROP TABLE %s" % table_name)
        self.connection.commit()
262793
@SafeVarargs
  public static void truncate(Table... tables) {
    foreach(tables, DBSetup::truncate, CallInfo.create());
  }
107101
def remove_dynamodb_tables():
    """"""
    logger.debug("[#] Removing DynamoDB tables")
    client = boto3.client('dynamodb', region_name=PRIMARY_REGION)

    responses = list()
    for label in DYNAMODB_TABLES:
        logger.debug("[*] Removing %s table" % (label))
        try:
            response = client.delete_table(
                TableName=label
            )
        except client.exceptions.ResourceNotFoundException:
            logger.info("[!] Table %s already removed" % (label))
            continue
        responses.append(response)
        logger.debug("[*] Removed %s table" % (label))
    logger.info("[#] Successfully removed DynamoDB tables")

    return responses
957262
def django_table_names(self, only_existing=False, **kwargs):
        

        all_models = list(chain.from_iterable(self.cql_models.values()))
        tables = [model.column_family_name(include_keyspace=False)
                  for model in all_models]

        return tables
752633
public function truncate() {
		$sql = $this->getSchema()->truncateSql($this->_connection);
		foreach ($sql as $snippet) {
			$this->_connection->execute($snippet);
		}
	}
483801
def _strip_empty_keys(self, params):
        
        keys = [k for k, v in params.items() if v == '']
        for key in keys:
            del params[key]
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);
            }
        }
    }
931782
def clear_database(engine: Connectable, schemas: Iterable[str] = ()) -> None:
    
    assert check_argument_types()
    metadatas = []
    all_schemas = (None,)  # type: Tuple[Optional[str], ...]
    all_schemas += tuple(schemas)
    for schema in all_schemas:
        # Reflect the schema to get the list of the tables, views and constraints
        metadata = MetaData()
        metadata.reflect(engine, schema=schema, views=True)
        metadatas.append(metadata)

    for metadata in metadatas:
        metadata.drop_all(engine, checkfirst=False)
1228747
public function deleteAll()
    {
        $this->_db->createCommand()->truncateTable($this->tableName)->execute();
        $this->_data = [];

        $this->_cache->delete($this->cacheKey);
    }
637081
def truncate_table(self, tablename):
        
        self.get(tablename).remove()
        self.db.commit()
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');
    }
381124
protected function dropTables()
    {
        $tables = $this->db->query(
            'SHOW FULL TABLES WHERE TABLE_TYPE LIKE "BASE_TABLE"',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        // Disable foreign key checks -- we are wiping the database on purpose
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 0',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        foreach ($tables as $table) {
            $this->db->query(
                'DROP TABLE '.reset($table),
                DbAdapter::QUERY_MODE_EXECUTE
            );
        }

        // Re-enable foreign key checks
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 1',
            DbAdapter::QUERY_MODE_EXECUTE
        );
    }