def readTables(self):
        """Retrieves data (D) and names (N) from relational tables.
        """
        class D: pass
        cur=self.cur
        cur.execute('SELECT * FROM users')
        D.users = cur.fetchall()
        cur.execute('SELECT * FROM profiles')
        D.profiles = cur.fetchall()
        cur.execute('SELECT * FROM articles')
        D.articles = cur.fetchall()
        cur.execute('SELECT * FROM comments')
        D.comments = cur.fetchall()
        cur.execute('SELECT * FROM friendships')
        D.friendships= cur.fetchall()
        cur.execute('SELECT * FROM votes')
        D.votes= cur.fetchall()
        cur.execute('SELECT * FROM tags')
        D.tags= cur.fetchall()
        cur.execute('SELECT * FROM taggings')
        D.taggings= cur.fetchall()
        self.D=D

        class N: pass
        cur.execute("select column_name from information_schema.columns where table_name='users';")
        UN=cur.fetchall()
        N.UN=[i[0] for i in UN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='profiles';")
        PN=cur.fetchall()
        N.PN=[i[0] for i in PN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='articles';")
        AN=cur.fetchall()
        N.AN=[i[0] for i in AN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='comments';")
        CN=cur.fetchall()
        N.CN=[i[0] for i in CN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='friendships';")
        FRN=cur.fetchall()
        N.FRN=[i[0] for i in FRN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='votes';")
        VN=cur.fetchall()
        N.VN=[i[0] for i in VN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='tags';")
        TN=cur.fetchall()
        N.TN=[i[0] for i in TN[::-1]]
        cur.execute("select column_name from information_schema.columns where table_name='taggings';")
        TTN=cur.fetchall()
        N.TTN=[i[0] for i in TTN[::-1]]
        self.N=N
def readTables ( self ) : class D : pass cur = self . cur cur . execute ( 'SELECT * FROM users' ) D . users = cur . fetchall ( ) cur . execute ( 'SELECT * FROM profiles' ) D . profiles = cur . fetchall ( ) cur . execute ( 'SELECT * FROM articles' ) D . articles = cur . fetchall ( ) cur . execute ( 'SELECT * FROM comments' ) D . comments = cur . fetchall ( ) cur . execute ( 'SELECT * FROM friendships' ) D . friendships = cur . fetchall ( ) cur . execute ( 'SELECT * FROM votes' ) D . votes = cur . fetchall ( ) cur . execute ( 'SELECT * FROM tags' ) D . tags = cur . fetchall ( ) cur . execute ( 'SELECT * FROM taggings' ) D . taggings = cur . fetchall ( ) self . D = D class N : pass cur . execute ( "select column_name from information_schema.columns where table_name='users';" ) UN = cur . fetchall ( ) N . UN = [ i [ 0 ] for i in UN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='profiles';" ) PN = cur . fetchall ( ) N . PN = [ i [ 0 ] for i in PN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='articles';" ) AN = cur . fetchall ( ) N . AN = [ i [ 0 ] for i in AN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='comments';" ) CN = cur . fetchall ( ) N . CN = [ i [ 0 ] for i in CN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='friendships';" ) FRN = cur . fetchall ( ) N . FRN = [ i [ 0 ] for i in FRN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='votes';" ) VN = cur . fetchall ( ) N . VN = [ i [ 0 ] for i in VN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='tags';" ) TN = cur . fetchall ( ) N . TN = [ i [ 0 ] for i in TN [ : : - 1 ] ] cur . execute ( "select column_name from information_schema.columns where table_name='taggings';" ) TTN = cur . fetchall ( ) N . TTN = [ i [ 0 ] for i in TTN [ : : - 1 ] ] self . N = N
Retrieves data (D) and names (N) from relational tables.