本文整理匯總了Python中pacemaker.model.meta.Session.connection方法的典型用法代碼示例。如果您正苦於以下問題:Python Session.connection方法的具體用法?Python Session.connection怎麽用?Python Session.connection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pacemaker.model.meta.Session
的用法示例。
在下文中一共展示了Session.connection方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: tearDownModule
# 需要導入模塊: from pacemaker.model.meta import Session [as 別名]
# 或者: from pacemaker.model.meta.Session import connection [as 別名]
def tearDownModule():
connection = Session.connection()
products = Product.__table__
projects = Project.__table__
components = Component.__table__
connection.execute(components.delete())
connection.execute(projects.delete())
connection.execute(products.delete())
示例2: tearDown
# 需要導入模塊: from pacemaker.model.meta import Session [as 別名]
# 或者: from pacemaker.model.meta.Session import connection [as 別名]
def tearDown(self):
connection = Session.connection()
products = Product.__table__
projects = Project.__table__
components = Component.__table__
sources = Source.__table__
binaries = Binary.__table__
connection.execute(binaries.delete())
connection.execute(sources.delete())
connection.execute(components.delete())
connection.execute(projects.delete())
connection.execute(products.delete())
示例3: tearDown
# 需要導入模塊: from pacemaker.model.meta import Session [as 別名]
# 或者: from pacemaker.model.meta.Session import connection [as 別名]
def tearDown(self):
connection = Session.connection()
queue_options = QueueOption.__table__
queues = Queue.__table__
connection.execute(queue_options.delete())
connection.execute(queues.delete())