MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / add_columns

Method add_columns

lib/sqlalchemy/orm/query.py:1619–1641  ·  view source on GitHub ↗

Add one or more column expressions to the list of result columns to be returned. .. seealso:: :meth:`_sql.Select.add_columns` - v2 comparable method.

(
        self, *column: _ColumnExpressionArgument[Any]
    )

Source from the content-addressed store, hash-verified

1617
1618 @_generative
1619 def add_columns(
1620 self, *column: _ColumnExpressionArgument[Any]
1621 ) -> Query[Any]:
1622 """Add one or more column expressions to the list
1623 of result columns to be returned.
1624
1625 .. seealso::
1626
1627 :meth:`_sql.Select.add_columns` - v2 comparable method.
1628 """
1629
1630 self._raw_columns = list(self._raw_columns)
1631
1632 self._raw_columns.extend(
1633 coercions.expect(
1634 roles.ColumnsClauseRole,
1635 c,
1636 apply_propagate_attrs=self,
1637 post_inspect=True,
1638 )
1639 for c in column
1640 )
1641 return self
1642
1643 @util.deprecated(
1644 "1.4",

Calls 1

extendMethod · 0.45