get all the tables of the currently connected db

        table_name -- string -- if you would like to filter the tables list to only include matches with this name
        return -- list -- a list of table names
973859
def get_tables(self, table_name="", **kwargs):
        
        with self.connection(**kwargs) as connection:
            kwargs['connection'] = connection
            return self._get_tables(str(table_name), **kwargs)
1262819
def list_tables(self):
        
        q = 'SELECT Distinct TABLE_NAME FROM information_schema.TABLES'
        res = self.quick(q, context='MYDB', task_name='listtables', system=True)
        # the first line is a header and the last is always empty
        # also, the table names have " as the first and last characters
        return [l[1:-1]for l in res.split('\n')[1:-1]]
1321441
def _tables_used(self):
        
        args = list(self._argspec.args)
        if self._argspec.defaults:
            default_args = list(self._argspec.defaults)
        else:
            default_args = []
        # Combine names from argument names and argument default values.
        names = args[:len(args) - len(default_args)] + default_args
        tables = set()
        for name in names:
            parent_name = name.split('.')[0]
            if is_table(parent_name):
                tables.add(parent_name)
        return tables
1218979
public function tableNames()
    {
        return collect(DB::select($this->getQuery()))
                    ->pluck('name')->reject(function ($name) {
                        return $this->skips()->contains($name);
                    });
    }
750036
protected List<String> getTableNames(final Connection connection) throws SQLException {
        ResultSet resultSet = null;

        try {
            final List<String> tables = new ArrayList<String>();

            resultSet = connection.getMetaData().getTables(null, null, "%", new String[] { "TABLE" });

            while (resultSet.next()) {
                tables.add(resultSet.getString("TABLE_NAME"));
            }
            return tables;
        } finally {
            if (resultSet != null) {
                resultSet.close();
            }
        }

    }
946031
def tables(self):
        
        _tables = set()

        for attr in six.itervalues(self.__dict__):
            if isinstance(attr, list):
                for item in attr:
                    if isinstance(item, Node):
                        _tables |= item.tables()
            elif isinstance(attr, Node):
                _tables |= attr.tables()

        return _tables
615399
static List<String> getAllTables(String database, Statement stmt) throws SQLException {
        List<String> table = new ArrayList<>();
        ResultSet rs;
        rs = stmt.executeQuery("SHOW TABLE STATUS FROM `" + database + "`;");
        while ( rs.next() ) {
            table.add(rs.getString("Name"));
        }
        return table;
    }
1155501
def all_databases(client, exclude=['local']):
	
	return (
		client[db_name]
		for db_name in client.list_database_names()
		if db_name not in exclude
	)
1314830
def _get_collections(self, db_names=None):
        
        if db_names:
            db_list = db_names
        else:
            db_list = self.client.list_database_names()

        for db_name in db_list:
            db = self.client.get_database(db_name)
            for col_name in db.list_collection_names():
                size = db[col_name].g
                yield f"{db_name}.{col_name}"
622774
def getTableIDs(dbid)
      tableIDs = []
      dbid ||= @dbid
      getSchema(dbid)      
      if @chdbids
         chdbidArray = findElementsByAttributeName( @chdbids, "name" )
         chdbidArray.each{ |chdbid|
            if chdbid.has_text?
               tableIDs << chdbid.text
            end
         }
      end
      tableIDs
    end
483156
def get_rows(self):
        
        rows = []
        if check_table_exists(self.tracker.dbcon_master, self.name):
            rows.extend(get_rows(self.tracker.dbcon_master, self.name))
        if self.tracker.dbcon_part and check_table_exists(self.tracker.dbcon_part, self.name):
            rows.extend(get_rows(self.tracker.dbcon_part, self.name))
        return rows
439888
private List<String> getFedoraTables() {
        try {
            InputStream in =
                    getClass().getClassLoader()
                            .getResourceAsStream(DBSPEC_LOCATION);
            List<TableSpec> specs = TableSpec.getTableSpecs(in);
            ArrayList<String> names = new ArrayList<String>();
            for (TableSpec spec: specs) {
                names.add(spec.getName().toUpperCase());
            }
            return names;
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("Unexpected error reading dbspec file",
                                       e);
        }
    }
34878
def all_collections(db):
	
	include_pattern = r'(?!system\.)'
	return (
		db[name]
		for name in db.list_collection_names()
		if re.match(include_pattern, name)
	)
924613
public static List<String> listAllTables() {
		int items = 100;
		ListTablesResult ltr = getClient().listTables(items);
		List<String> tables = new LinkedList<>();
		String lastKey;
		do {
			tables.addAll(ltr.getTableNames());
			lastKey = ltr.getLastEvaluatedTableName();
			logger.info("Found {} tables. Total found: {}.", ltr.getTableNames().size(), tables.size());
			if (lastKey == null) {
				break;
			}
			ltr = getClient().listTables(lastKey, items);
		} while (!ltr.getTableNames().isEmpty());
		return tables;
	}
1164947
def get_view_names(self, connection, schema=None, **kw):
        
        return self._get_table_or_view_names('v', connection, schema, **kw)
1241718
def get_table_names(engine: Engine) -> List[str]:
    
    insp = Inspector.from_engine(engine)
    return insp.get_table_names()
78488
public Collection<String> listTables() throws SQLException {

	Collection<String> result = new ArrayList<String>();
	DatabaseMetaData dbm = connection.getMetaData();
	String types[] = { "TABLE" };
	ResultSet rs = dbm.getTables(null, null, "", types);
	while (rs.next()) {
	    String str = rs.getString("TABLE_NAME");
	    result.add(str);
	}
	return result;
    }