The directive behaves like an SQL WHERE clause without the WHERE. The #sqlCondition directive is used only with the defaultSelectCondition property of the SQL Record part (see SQLRecord stereotype).
#sqlCondition{
condition
}
Record CustomerRecord type sqlRecord
{ tableNames = [["Customer"]],
keyItems = ["customerNumber"],
defaultSelectCondition =
#sqlCondition{
customer_balance > 0
}
}
#sqlCondition{
customer_balance >= :minimumBalance
AND
customer_number IN (SELECT customer_number FROM Orders)
}
An initial colon character indicates the use of a host variable (a variable defined in the language hosting SQL, in this case, EGL), for example, :minimumBalance.