public final class AlignmentRules extends Object implements LayoutRule
GFmtOpt.alignAliasInSelectList is set (and the list is stacked,
TAlignStyle.AsStacked), aligns each stacked SELECT-list continuation
column under the first column (i.e. just past the SELECT keyword)
rather than at a flat indent:
SELECT a,
b,
c
The alignment column is indentOf(SELECT) + len(SELECT) + 1. This
overrides IndentRules' flat indent for those columns (priority
LayoutPriorities.ALIGNMENT > LayoutPriorities.INDENT).
Only SELECT-list continuation columns that begin a line are aligned (the first column stays on the SELECT line). Needs S20 sql + S21 clause analyses. Iterative; read-only over tokens.
Plan reference: §7.3/S28, §7.4/S28.
| Constructor and Description |
|---|
AlignmentRules() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(LayoutContext context)
Apply the rule, requesting layout decisions on the context.
|
String |
name()
Short, stable identifier for logging/diagnostics.
|
int |
priority()
The rule's precedence.
|
public AlignmentRules()
public int priority()
LayoutRulepriority in interface LayoutRulepublic String name()
LayoutRulename in interface LayoutRulepublic void apply(LayoutContext context)
LayoutRuleapply in interface LayoutRule