本文整理汇总了Python中sqlalchemy.sql.expression.Executable方法的典型用法代码示例。如果您正苦于以下问题:Python expression.Executable方法的具体用法?Python expression.Executable怎么用?Python expression.Executable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sqlalchemy.sql.expression
的用法示例。
在下文中一共展示了expression.Executable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: retry_sql_on_deadlock
# 需要导入模块: from sqlalchemy.sql import expression [as 别名]
# 或者: from sqlalchemy.sql.expression import Executable [as 别名]
def retry_sql_on_deadlock(executable, *args, **kwargs):
assert isinstance(executable, Executable)
return retry_on_deadlock(executable, *args, **kwargs)
示例2: retry_multi_sql_on_deadlock
# 需要导入模块: from sqlalchemy.sql import expression [as 别名]
# 或者: from sqlalchemy.sql.expression import Executable [as 别名]
def retry_multi_sql_on_deadlock(executables, *args, **kwargs):
assert isinstance(executables, list)
assert all([isinstance(_, Executable) for _ in executables])
return retry_on_deadlock(executables, *args, **kwargs)
示例3: __init__
# 需要导入模块: from sqlalchemy.sql import expression [as 别名]
# 或者: from sqlalchemy.sql.expression import Executable [as 别名]
def __init__(self, name):
"""
Builds the Executable/ClauseElement that represents the refresh command
Parameters
----------
name: str, required
The name of the view to refresh
"""
self.name = name