(self)
Handle grants for tables and sequences.
        
        The tricky part here is the automatic handling of sequences.
Handle grants for tables and sequences.
        
        The tricky part here is the automatic handling of sequences.
Handle grants for tables and sequences . The tricky part here is the automatic handling of sequences .
def handle_tables(self):
        """Handle grants for tables and sequences.
        
        The tricky part here is the automatic handling of sequences."""

        if not self.sect_hasvar('on.tables'):
            return

        cleaned_list = []
        table_list = self.sect_list('on.tables')
        for table in table_list:
            if table[-1] == '!':
                table = table[:-1]
                if not self.auto_seq:
                    self.seq_list.append("%s_%s_seq" % (table, self.seq_name))
            else:
                if self.auto_seq:
                    self.seq_list.append("%s_%s_seq" % (table, self.seq_name))
            cleaned_list.append(table)
        obj_str = "TABLE " + ", ".join(cleaned_list)

        if self.revoke & R_NEW:
            self.gen_revoke(obj_str)
        if self.revoke & R_DEFS:
            self.gen_revoke_defs(obj_str, "TABLE")
        if not self.revoke & R_ONLY:
            self.gen_one_type(obj_str)
        if self.revoke & G_DEFS:
            self.gen_defs(obj_str, "TABLE")

        # cleanup
        self.seq_list = []
        self.seq_allowed = []
def handle_tables ( self ) : if not self . sect_hasvar ( 'on.tables' ) : return cleaned_list = [ ] table_list = self . sect_list ( 'on.tables' ) for table in table_list : if table [ - 1 ] == '!' : table = table [ : - 1 ] if not self . auto_seq : self . seq_list . append ( "%s_%s_seq" % ( table , self . seq_name ) ) else : if self . auto_seq : self . seq_list . append ( "%s_%s_seq" % ( table , self . seq_name ) ) cleaned_list . append ( table ) obj_str = "TABLE " + ", " . join ( cleaned_list ) if self . revoke & R_NEW : self . gen_revoke ( obj_str ) if self . revoke & R_DEFS : self . gen_revoke_defs ( obj_str , "TABLE" ) if not self . revoke & R_ONLY : self . gen_one_type ( obj_str ) if self . revoke & G_DEFS : self . gen_defs ( obj_str , "TABLE" ) # cleanup self . seq_list = [ ] self . seq_allowed = [ ]