MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / remote

Function remote

lib/sqlalchemy/orm/relationships.py:219–235  ·  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

217
218
219def remote(expr: _CEA) -> _CEA:
220 """Annotate a portion of a primaryjoin expression
221 with a 'remote' annotation.
222
223 See the section :ref:`relationship_custom_foreign` for a
224 description of use.
225
226 .. seealso::
227
228 :ref:`relationship_custom_foreign`
229
230 :func:`.foreign`
231
232 """
233 return _annotate_columns( # type: ignore
234 coercions.expect(roles.ColumnArgumentRole, expr), {"remote": True}
235 )
236
237
238def foreign(expr: _CEA) -> _CEA:

Calls 1

_annotate_columnsFunction · 0.85