Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.56 KB

DdlPositionBracesRule.md

File metadata and controls

73 lines (53 loc) · 1.56 KB

<-- previous rule | overview | next rule -->

Break before select list braces

Standardizes line breaks and indentation of braces around select lists.

Options

  • Break before opening brace { of select list: [Always]
  • Indent if breaking: [0]
  • Break before closing brace } of select list: [Always]
  • Indent if breaking: [0]
  • Break before FROM (in syntax without braces): [Always]
  • Indent if breaking: [2]

Examples

define view entity C_AnyEntity
  as select from I_AnyEntity as AnyAlias

  {
  key AnyAlias.AnyKeyField,
      AnyAlias.AnyNonKeyField
      }

union all 
  select from I_OtherEntity As OtherAlias {
  key OtherAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
  }

except
  select from I_ThirdEntity As ThirdAlias
  {
  key ThirdAlias.AnyKeyField,
      ThirdAlias.AnyNonKeyField }

Resulting code:

define view entity C_AnyEntity
  as select from I_AnyEntity as AnyAlias

{
  key AnyAlias.AnyKeyField,
      AnyAlias.AnyNonKeyField
}

union all
  select from I_OtherEntity As OtherAlias
{
  key OtherAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
}

except
  select from I_ThirdEntity As ThirdAlias
{
  key ThirdAlias.AnyKeyField,
      ThirdAlias.AnyNonKeyField
}

Related code