MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / self_group

Method self_group

lib/sqlalchemy/sql/functions.py:801–811  ·  view source on GitHub ↗
(self, against: Optional[OperatorType] = None)

Source from the content-addressed store, hash-verified

799 )
800
801 def self_group(self, against: Optional[OperatorType] = None) -> ClauseElement: # type: ignore[override] # noqa E501
802 # for the moment, we are parenthesizing all array-returning
803 # expressions against getitem. This may need to be made
804 # more portable if in the future we support other DBs
805 # besides postgresql.
806 if against is operators.getitem and isinstance(
807 self.type, sqltypes.ARRAY
808 ):
809 return Grouping(self)
810 else:
811 return super().self_group(against=against)
812
813 @property
814 def entity_namespace(self) -> _EntityNamespace:

Callers

nothing calls this directly

Calls 1

GroupingClass · 0.85

Tested by

no test coverage detected