@connected
    def show_fields(self, *globs):

        def starname(col):
            star = '*' if col.primary_key else ''
            return star + col.name

        def glob_columns(table):
            for c in table.columns:
                for glob in globs:
                    bits = glob.split('.', 1)
                    if len(bits) == 1:
                        glob += '.*'
                    if fnmatch.fnmatch('%s.%s' % (table.name, c.name), glob):
                        yield c

        with pager() as out:
            for table in viewvalues(self.get_metadata().tables):
                if globs:
                    columns = list(glob_columns(table))
                else:
                    columns = table.columns
                columns = {starname(c): c for c in columns}
                if columns:
                    out.write(table.name.encode('utf8') + b'\n')
                    out.write(b'-' * len(table.name) + b'\n')
                for starcol in sorted(columns):
                    col = columns[starcol]
                    output = "    %-35s%s %s\n" % (
                        starcol,
                        col.type,
                        'NULL' if col.nullable else 'NOT NULL')
                    out.write(output.encode('utf8'))
                if columns:
                    out.write(b'\n')
Print a list of fields matching the input glob tableglob[.fieldglob].
dataset/ETHPy150Open jaysw/ipydb/ipydb/plugin.py/SqlPlugin.show_fields