(self, cmd)
tables ?PATTERN?: Lists names of tables matching LIKE pattern

        This also returns views.
tables ?PATTERN?: Lists names of tables matching LIKE pattern
tables ?PATTERN? : Lists names of tables matching LIKE pattern
def command_tables(self, cmd):
        """tables ?PATTERN?: Lists names of tables matching LIKE pattern

        This also returns views.
        """
        self.push_output()
        self.output = self.output_list
        self.header = False
        try:
            if len(cmd) == 0:
                cmd = ['%']

            # The SQLite shell code filters out sqlite_ prefixes if
            # you specified an argument else leaves them in.  It also
            # has a hand coded output mode that does space separation
            # plus wrapping at 80 columns.
            for n in cmd:
                self.process_sql(
                    "SELECT name FROM sqlite_master "
                    "WHERE type IN ('table', 'view') AND name NOT LIKE 'sqlite_%' "
                    "AND name like ?1 "
                    "UNION ALL "
                    "SELECT name FROM sqlite_temp_master "
                    "WHERE type IN ('table', 'view') AND name NOT LIKE 'sqlite_%' "
                    "ORDER BY 1", (n, ),
                    internal=True)
        finally:
            self.pop_output()
def command_tables ( self , cmd ) : self . push_output ( ) self . output = self . output_list self . header = False try : if len ( cmd ) == 0 : cmd = [ '%' ] # The SQLite shell code filters out sqlite_ prefixes if # you specified an argument else leaves them in.  It also # has a hand coded output mode that does space separation # plus wrapping at 80 columns. for n in cmd : self . process_sql ( "SELECT name FROM sqlite_master " "WHERE type IN ('table', 'view') AND name NOT LIKE 'sqlite_%' " "AND name like ?1 " "UNION ALL " "SELECT name FROM sqlite_temp_master " "WHERE type IN ('table', 'view') AND name NOT LIKE 'sqlite_%' " "ORDER BY 1" , ( n , ) , internal = True ) finally : self . pop_output ( )