MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / column

Method column

lib/sqlalchemy/sql/selectable.py:6228–6244  ·  view source on GitHub ↗

Return a new :func:`_expression.select` construct with the given column expression added to its columns clause. E.g.:: my_select = my_select.column(table.c.new_column) See the documentation for :meth:`_expression.Select.with_only_columns` for gu

(
        self, column: _ColumnsClauseArgument[Any]
    )

Source from the content-addressed store, hash-verified

6226 ":meth:`_expression.Select.add_columns`",
6227 )
6228 def column(
6229 self, column: _ColumnsClauseArgument[Any]
6230 ) -> Select[Unpack[TupleAny]]:
6231 """Return a new :func:`_expression.select` construct with
6232 the given column expression added to its columns clause.
6233
6234 E.g.::
6235
6236 my_select = my_select.column(table.c.new_column)
6237
6238 See the documentation for
6239 :meth:`_expression.Select.with_only_columns`
6240 for guidelines on adding /replacing the columns of a
6241 :class:`_expression.Select` object.
6242
6243 """
6244 return self.add_columns(column)
6245
6246 @util.preload_module("sqlalchemy.sql.util")
6247 def reduce_columns(

Callers

nothing calls this directly

Calls 1

add_columnsMethod · 0.95

Tested by

no test coverage detected