given(args)
Returns true if every arg has been passed in as a parameter.
Only applicable inside a relation extension or generator.
Examples
These examples are anonymous relation generators. We pass at least one parameter, c, to make sure the generator is called. If given is true here, yield returns one row (dee) else no rows (dum).
Neither a nor b passed, false
{a:int, b:int, c:int} begin if given(a,b) begin yield end end & dee(c:=0)
┌───┬───┬───┐ │ c │ a │ b │ ├───┼───┼───┤ └───┴───┴───┘
a not b passed, false
{a:int, b:int, c:int} begin if given(a,b) begin yield end end & dee(c:=0, a:=42)
┌───┬───┬───┐ │ c │ a │ b │ ├───┼───┼───┤ └───┴───┴───┘
a and b passed, true
{a:int, b:int, c:int} begin if given(a,b) begin yield end end & dee(c:=0, a:=42, b:=99)
┌───┬────┬────┐ │ c │ a │ b │ ├───┼────┼────┤ │ 0 │ 42 │ 99 │ └───┴────┴────┘
Multiple checks
For general purpose generators given can be used to check all combinations of parameters, present or not. See the example definition of plus.