Skip to content

Constrain command

Include: Use Db\DBCommands.pkg

Purpose

Adds DD constraints through command syntax.

Syntax

Constrain oDataDictionary.Field GT value
Constrain oDataDictionary.Field EQ oOtherDD.Field
Constrain oDataDictionary Relates to oParentDD
Constrain oDataDictionary.Field Between lowValue and highValue

How it works

  • Direct value constraints route to Add_Value_Constraint.
  • Field-to-field constraints route to Add_Field_Value_Constraint.
  • Relates to constraints route to Add_Relates_To_Constraint.
  • Between expands to GE and LE constraints.
  • Expression constraints with Constrain DD as <expression> are outside this API.

Examples

Constrain oCustomerDD.Balance GT 30000

Object oInventoryQuery is a cDbQuery
    Constrain oInventoryDD Relates to oVendorDD
End_Object

See also