listserial.py
changeset 83 515fadd3d286
parent 40 922d7fb63384
child 93 b72591087495
equal deleted inserted replaced
82:7b82dc1fb6f5 83:515fadd3d286
     1 #!/usr/bin/env python3.2
     1 #!/usr/bin/env python3.2
     2 
     2 
     3 from pgtoolkit import toolbase, pgbrowser
     3 from pgtoolkit import toolbase, pgbrowser
     4 from pgtoolkit.highlight import highlight, WHITE, YELLOW, RED, BOLD
     4 from pycolib.ansicolor import highlight, WHITE, YELLOW, RED, BOLD
     5 
     5 
     6 
     6 
     7 class ListSerialTool(toolbase.SimpleTool):
     7 class ListSerialTool(toolbase.SimpleTool):
     8     max_int = 2147483647
     8     max_int = 2147483647
     9     
     9 
    10     def __init__(self):
    10     def __init__(self):
    11         toolbase.SimpleTool.__init__(self, name='listserial', desc='List sequences attached to column of type integer with dangerous last_value.')
    11         toolbase.SimpleTool.__init__(self, name='listserial', desc='List sequences attached to column of type integer with dangerous last_value.')
    12         self.init()
    12         self.init()
    13     
    13 
    14     def main(self):
    14     def main(self):
    15         conn = self.pgm.get_conn('target')
    15         conn = self.pgm.get_conn('target')
    16         browser = pgbrowser.PgBrowser(conn)
    16         browser = pgbrowser.PgBrowser(conn)
    17         rows = browser.list_sequences()
    17         rows = browser.list_sequences()
    18         sequences = []
    18         sequences = []