Construct a new :class:`_expression.Join`. The usual entrypoint here is the :func:`_expression.join` function or the :meth:`_expression.FromClause.join` method of any :class:`_expression.FromClause` object.
(
self,
left: _FromClauseArgument,
right: _FromClauseArgument,
onclause: Optional[_OnClauseArgument] = None,
isouter: bool = False,
full: bool = False,
)
| 1306 | full: bool |
| 1307 | |
| 1308 | def __init__( |
| 1309 | self, |
| 1310 | left: _FromClauseArgument, |
| 1311 | right: _FromClauseArgument, |
| 1312 | onclause: Optional[_OnClauseArgument] = None, |
| 1313 | isouter: bool = False, |
| 1314 | full: bool = False, |
| 1315 | ): |
| 1316 | """Construct a new :class:`_expression.Join`. |
| 1317 | |
| 1318 | The usual entrypoint here is the :func:`_expression.join` |
| 1319 | function or the :meth:`_expression.FromClause.join` method of any |
| 1320 | :class:`_expression.FromClause` object. |
| 1321 | |
| 1322 | """ |
| 1323 | |
| 1324 | # when deannotate was removed here, callcounts went up for ORM |
| 1325 | # compilation of eager joins, since there were more comparisons of |
| 1326 | # annotated objects. test_orm.py -> test_fetch_results |
| 1327 | # was therefore changed to show a more real-world use case, where the |
| 1328 | # compilation is cached; there's no change in post-cache callcounts. |
| 1329 | # callcounts for a single compilation in that particular test |
| 1330 | # that includes about eight joins about 1100 extra fn calls, from |
| 1331 | # 29200 -> 30373 |
| 1332 | |
| 1333 | self.left = coercions.expect( |
| 1334 | roles.FromClauseRole, |
| 1335 | left, |
| 1336 | ) |
| 1337 | self.right = coercions.expect( |
| 1338 | roles.FromClauseRole, |
| 1339 | right, |
| 1340 | ).self_group() |
| 1341 | |
| 1342 | if onclause is None: |
| 1343 | self.onclause = self._match_primaries(self.left, self.right) |
| 1344 | else: |
| 1345 | # note: taken from If91f61527236fd4d7ae3cad1f24c38be921c90ba |
| 1346 | # not merged yet |
| 1347 | self.onclause = coercions.expect( |
| 1348 | roles.OnClauseRole, onclause |
| 1349 | ).self_group(against=operators._asbool) |
| 1350 | |
| 1351 | self.isouter = isouter |
| 1352 | self.full = full |
| 1353 | |
| 1354 | @util.ro_non_memoized_property |
| 1355 | def description(self) -> str: |