本文整理匯總了Python中sqlalchemy.orm.defer._add_unbound_fn方法的典型用法代碼示例。如果您正苦於以下問題:Python defer._add_unbound_fn方法的具體用法?Python defer._add_unbound_fn怎麽用?Python defer._add_unbound_fn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sqlalchemy.orm.defer
的用法示例。
在下文中一共展示了defer._add_unbound_fn方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _add_unbound_fn
# 需要導入模塊: from sqlalchemy.orm import defer [as 別名]
# 或者: from sqlalchemy.orm.defer import _add_unbound_fn [as 別名]
def _add_unbound_fn(self, fn):
self._unbound_fn = fn
fn_doc = self.fn.__doc__
self.fn.__doc__ = """Produce a new :class:`.Load` object with the
:func:`.orm.%(name)s` option applied.
See :func:`.orm.%(name)s` for usage examples.
""" % {"name": self.name}
fn.__doc__ = fn_doc
return self
示例2: _add_unbound_fn
# 需要導入模塊: from sqlalchemy.orm import defer [as 別名]
# 或者: from sqlalchemy.orm.defer import _add_unbound_fn [as 別名]
def _add_unbound_fn(self, fn):
self._unbound_fn = fn
fn_doc = self.fn.__doc__
self.fn.__doc__ = """Produce a new :class:`_orm.Load` object with the
:func:`_orm.%(name)s` option applied.
See :func:`_orm.%(name)s` for usage examples.
""" % {
"name": self.name
}
fn.__doc__ = fn_doc
return self