MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / with_criteria

Method with_criteria

lib/sqlalchemy/ext/baked.py:110–118  ·  view source on GitHub ↗

Add a criteria function to a :class:`.BakedQuery` cloned from this one. This is equivalent to using the ``+`` operator to produce a new :class:`.BakedQuery` with modifications.

(self, fn, *args)

Source from the content-addressed store, hash-verified

108 return self
109
110 def with_criteria(self, fn, *args):
111 """Add a criteria function to a :class:`.BakedQuery` cloned from this
112 one.
113
114 This is equivalent to using the ``+`` operator to
115 produce a new :class:`.BakedQuery` with modifications.
116
117 """
118 return self._clone().add_criteria(fn, *args)
119
120 def for_session(self, session):
121 """Return a :class:`_baked.Result` object for this

Callers 6

__add__Method · 0.95
countMethod · 0.80
firstMethod · 0.80
_load_on_pk_identityMethod · 0.80
test_chained_addMethod · 0.80

Calls 2

_cloneMethod · 0.95
add_criteriaMethod · 0.45

Tested by 2

test_chained_addMethod · 0.64