本文整理汇总了Python中sqlalchemy.column.self_group方法的典型用法代码示例。如果您正苦于以下问题:Python column.self_group方法的具体用法?Python column.self_group怎么用?Python column.self_group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sqlalchemy.column
的用法示例。
在下文中一共展示了column.self_group方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: append_column
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def append_column(self, column):
"""append the given column expression to the columns clause of this
select() construct.
This is an **in-place** mutation method; the
:meth:`~.Select.column` method is preferred, as it provides standard
:term:`method chaining`.
"""
self._reset_exported()
column = _interpret_as_column_or_from(column)
if isinstance(column, ScalarSelect):
column = column.self_group(against=operators.comma_op)
self._raw_columns = self._raw_columns + [column]
示例2: __init__
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def __init__(self, left, right, onclause=None, isouter=False):
"""Construct a new :class:`.Join`.
The usual entrypoint here is the :func:`~.expression.join`
function or the :meth:`.FromClause.join` method of any
:class:`.FromClause` object.
"""
self.left = _interpret_as_from(left)
self.right = _interpret_as_from(right).self_group()
if onclause is None:
self.onclause = self._match_primaries(self.left, self.right)
else:
self.onclause = onclause
self.isouter = isouter
示例3: __init__
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def __init__(self, left, right, onclause=None, isouter=False, full=False):
"""Construct a new :class:`.Join`.
The usual entrypoint here is the :func:`~.expression.join`
function or the :meth:`.FromClause.join` method of any
:class:`.FromClause` object.
"""
self.left = _interpret_as_from(left)
self.right = _interpret_as_from(right).self_group()
if onclause is None:
self.onclause = self._match_primaries(self.left, self.right)
else:
self.onclause = onclause
self.isouter = isouter
self.full = full
示例4: self_group
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def self_group(self, against=None):
return FromGrouping(self)
示例5: correlate
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def correlate(self, *fromclause):
e = self._clone()
e.element = self.element.correlate(*fromclause).self_group()
return e
示例6: correlate_except
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def correlate_except(self, *fromclause):
e = self._clone()
e.element = self.element.correlate_except(*fromclause).self_group()
return e
示例7: select_from
# 需要导入模块: from sqlalchemy import column [as 别名]
# 或者: from sqlalchemy.column import self_group [as 别名]
def select_from(self, clause):
"""return a new :class:`.Exists` construct, applying the given
expression to the :meth:`.Select.select_from` method of the select
statement contained.
"""
e = self._clone()
e.element = self.element.select_from(clause).self_group()
return e