本文整理汇总了Python中paella.db.midlevel.StatementCursor.close方法的典型用法代码示例。如果您正苦于以下问题:Python StatementCursor.close方法的具体用法?Python StatementCursor.close怎么用?Python StatementCursor.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paella.db.midlevel.StatementCursor
的用法示例。
在下文中一共展示了StatementCursor.close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from paella.db.midlevel import StatementCursor [as 别名]
# 或者: from paella.db.midlevel.StatementCursor import close [as 别名]
def __init__(self, name='Manager'):
CommandBoxWindow.__init__(self)
self.cfg = PaellaConfig('database')
self.dialogs = {}.fromkeys(['dbname', 'suitemanager'])
apps = ['profiles', 'families', 'suitemanager', 'traitmanager', 'machines',
'traits', 'tdiff', 'sdiff', 'fdiff', 'default_environment', 'clients']
self.workspace = {}.fromkeys(apps)
self.add_menu(dbcommands, 'database', self.database_command)
self.add_menu(self.workspace.keys(), 'edit', self.edit_command)
self.set_size_request(150,200)
self.conn = None
self.dbname = None
self.dblist = ScrollCList()
self.vbox.add(self.dblist)
conn = PaellaConnection(self.cfg)
cursor = StatementCursor(conn, 'quicky')
self.dblist.set_rows(cursor.select(table='pg_database'))
cursor.close()
conn.close()
self.tbar.add_button('profiles', 'profile manager', self.run_tbar)
self.tbar.add_button('families', 'family manager', self.run_tbar)
self.tbar.add_button('machines', 'machine manager', self.run_tbar)
self.tbar.add_button('traits', 'trait manager', self.run_tbar)
self.tbar.add_button('tdiff', 'template differ', self.run_tbar)
self.tbar.add_button('sdiff', 'script differ', self.run_tbar)
self.tbar.add_button('fdiff', 'family differ', self.run_tbar)
示例2: __init__
# 需要导入模块: from paella.db.midlevel import StatementCursor [as 别名]
# 或者: from paella.db.midlevel.StatementCursor import close [as 别名]
def __init__(self, name='Manager'):
CommandBoxWindow.__init__(self)
self.cfg = PaellaConfig('database')
self.dialogs = {}.fromkeys(['dbname', 'suitemanager'])
self.workspace = {}.fromkeys(['profiles', 'suitemanager', 'traitmanager', 'machines'])
self.add_menu(dbcommands, 'database', self.database_command)
self.add_menu(self.workspace.keys(), 'edit', self.edit_command)
self.set_size_request(150,200)
self.conn = None
self.dbname = None
self.dblist = ScrollCList()
self.vbox.add(self.dblist)
conn = PaellaConnection(self.cfg)
cursor = StatementCursor(conn, 'quicky')
self.dblist.set_rows(cursor.select(table='pg_database'))
cursor.close()
conn.close()