MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / add_criteria

Method add_criteria

lib/sqlalchemy/ext/baked.py:99–108  ·  view source on GitHub ↗

Add a criteria function to this :class:`.BakedQuery`. This is equivalent to using the ``+=`` operator to modify a :class:`.BakedQuery` in-place.

(self, fn, *args)

Source from the content-addressed store, hash-verified

97 return self.with_criteria(other)
98
99 def add_criteria(self, fn, *args):
100 """Add a criteria function to this :class:`.BakedQuery`.
101
102 This is equivalent to using the ``+=`` operator to
103 modify a :class:`.BakedQuery` in-place.
104
105 """
106 self._update_cache_key(fn, args)
107 self.steps.append(fn)
108 return self
109
110 def with_criteria(self, fn, *args):
111 """Add a criteria function to a :class:`.BakedQuery` cloned from this

Callers 3

__iadd__Method · 0.95
_add_lazyload_optionsMethod · 0.95
with_criteriaMethod · 0.45

Calls 2

_update_cache_keyMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected