Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 2.12 KB

DdlAlignEntityParametersRule.md

File metadata and controls

85 lines (56 loc) · 2.12 KB

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

Align view parameters

Aligns the parameter definitions of a view.

Parameter indent is configured in 'Break before DEFINE etc.'. Space around colons (if colons are not aligned) is configured in 'Standardize spaces around colon, comma etc.'.

Options

  • Align colons in own column
  • Align types in own column

Examples

@EndUserText.label: 'Any Description'

define view entity C_AnyEntity
  with parameters
    @AnalyticsDetails.query.variableSequence: 30
    P_AnyParam: any_parameter_type,

    // comment on OtherParam
    @AnalyticsDetails.query.variableSequence: 50
    P_OtherParam :           other_type,

    @AnalyticsDetails.query.variableSequence: 60
    @Consumption.defaultValue: 'NN'
    P_ThirdParameter   : third_type,

    @Consumption.hidden: true
    P_FourthParam:fourth_type

  as select from I_AnyEntity as AnyAlias

    left outer to one join I_OtherEntity as OtherAlias
      on AnyAlias.IdField = OtherAlias.IdField

{
  key AnyAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
}

Resulting code:

@EndUserText.label: 'Any Description'

define view entity C_AnyEntity
  with parameters
    @AnalyticsDetails.query.variableSequence: 30
    P_AnyParam       : any_parameter_type,

    // comment on OtherParam
    @AnalyticsDetails.query.variableSequence: 50
    P_OtherParam     : other_type,

    @AnalyticsDetails.query.variableSequence: 60
    @Consumption.defaultValue: 'NN'
    P_ThirdParameter : third_type,

    @Consumption.hidden: true
    P_FourthParam    : fourth_type

  as select from I_AnyEntity as AnyAlias

    left outer to one join I_OtherEntity as OtherAlias
      on AnyAlias.IdField = OtherAlias.IdField

{
  key AnyAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
}

Related code