MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / go

Method go

lib/sqlalchemy/testing/fixtures/sql.py:523–536  ·  view source on GitHub ↗
(query, *expr)

Source from the content-addressed store, hash-verified

521 from sqlalchemy.dialects.postgresql import distinct_on
522
523 def go(query, *expr):
524 if request.param == "legacy":
525 if expr:
526 with expect_deprecated(
527 "Passing expression to ``distinct`` to generate a "
528 "DISTINCT "
529 "ON clause is deprecated. Use instead the "
530 "``postgresql.distinct_on`` function as an extension."
531 ):
532 return query.distinct(*expr)
533 else:
534 return query.distinct()
535 elif request.param == "new":
536 return query.ext(distinct_on(*expr))
537
538 return go

Callers

nothing calls this directly

Calls 4

distinct_onFunction · 0.90
expect_deprecatedFunction · 0.85
distinctMethod · 0.45
extMethod · 0.45

Tested by

no test coverage detected