dbbase.column_types.WriteOnlyColumn.self_group¶
-
WriteOnlyColumn.
self_group
(against=None)¶ Apply a ‘grouping’ to this
_expression.ClauseElement
.This method is overridden by subclasses to return a “grouping” construct, i.e. parenthesis. In particular it’s used by “binary” expressions to provide a grouping around themselves when placed into a larger expression, as well as by
_expression.select()
constructs when placed into the FROM clause of another_expression.select()
. (Note that subqueries should be normally created using the_expression.Select.alias()
method, as many platforms require nested SELECT statements to be named).As expressions are composed together, the application of
self_group()
is automatic - end-user code should never need to use this method directly. Note that SQLAlchemy’s clause constructs take operator precedence into account - so parenthesis might not be needed, for example, in an expression likex OR (y AND z)
- AND takes precedence over OR.The base
self_group()
method of_expression.ClauseElement
just returns self.