MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / remote

Function remote

lib/sqlalchemy/orm/relationships.py:211–227  ·  view source on GitHub ↗

Annotate a portion of a primaryjoin expression with a 'remote' annotation. See the section :ref:`relationship_custom_foreign` for a description of use. .. seealso:: :ref:`relationship_custom_foreign` :func:`.foreign`

(expr: _CEA)

Source from the content-addressed store, hash-verified

209
210
211def remote(expr: _CEA) -> _CEA:
212 """Annotate a portion of a primaryjoin expression
213 with a 'remote' annotation.
214
215 See the section :ref:`relationship_custom_foreign` for a
216 description of use.
217
218 .. seealso::
219
220 :ref:`relationship_custom_foreign`
221
222 :func:`.foreign`
223
224 """
225 return _annotate_columns( # type: ignore
226 coercions.expect(roles.ColumnArgumentRole, expr), {"remote": True}
227 )
228
229
230def foreign(expr: _CEA) -> _CEA:

Calls 1

_annotate_columnsFunction · 0.85