本文整理匯總了Python中sqlalchemy.sql.operators.truediv方法的典型用法代碼示例。如果您正苦於以下問題:Python operators.truediv方法的具體用法?Python operators.truediv怎麽用?Python operators.truediv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sqlalchemy.sql.operators
的用法示例。
在下文中一共展示了operators.truediv方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _expression_adaptations
# 需要導入模塊: from sqlalchemy.sql import operators [as 別名]
# 或者: from sqlalchemy.sql.operators import truediv [as 別名]
def _expression_adaptations(self):
return {
operators.mul: {
Interval: Interval,
Numeric: self.__class__,
Integer: self.__class__,
},
operators.div: {
Numeric: self.__class__,
Integer: self.__class__,
},
operators.truediv: {
Numeric: self.__class__,
Integer: self.__class__,
},
operators.add: {
Numeric: self.__class__,
Integer: self.__class__,
},
operators.sub: {
Numeric: self.__class__,
Integer: self.__class__,
}
}
示例2: _expression_adaptations
# 需要導入模塊: from sqlalchemy.sql import operators [as 別名]
# 或者: from sqlalchemy.sql.operators import truediv [as 別名]
def _expression_adaptations(self):
# TODO: need a dictionary object that will
# handle operators generically here, this is incomplete
return {
operators.add: {
Date: Date,
Integer: self.__class__,
Numeric: Numeric,
},
operators.mul: {
Interval: Interval,
Integer: self.__class__,
Numeric: Numeric,
},
operators.div: {Integer: self.__class__, Numeric: Numeric},
operators.truediv: {Integer: self.__class__, Numeric: Numeric},
operators.sub: {Integer: self.__class__, Numeric: Numeric},
}