Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example we select attr1 from MyTable, where the age is greater than the value provided by in.age and the type equals the value set by in.type. Note, the value must be prefixed with a $ and wrapped in curly braces i.e. ${...}

Code Block
${
	sql( "select attr1 from " + in.MyTable + " where age > ? and type =?", in.age, in.type )
}

...

You can also return a list of results, such as with a list shown here or using a forEach: 

Code Block
${
	[

		sql("update foo set (column = ?) where age > ?",  in.newAge, in.age),

		sql("update bar set (column = ?) where value > ?", in.newValue, in.value)

	]
}

...