Additional tests.

This commit is contained in:
go-jet 2025-10-17 13:41:08 +02:00
parent 4ee047a675
commit 89e93710aa
4 changed files with 262 additions and 26 deletions

View file

@ -394,8 +394,8 @@ func ARRAY_NDIMS[E Expression](arr Array[E]) IntegerExpression {
// If the third argument is given, the search begins at that subscript.
// The array must be one-dimensional.
// Comparisons are done using IS NOT DISTINCT FROM semantics, so it is possible to search for NULL.
func ARRAY_POSITION[E Expression](arr Array[E], elem E, beginAt ...IntegerExpression) IntegerExpression {
return IntExp(Func("ARRAY_POSITION", optionalAppend([]Expression{arr, elem}, beginAt)...))
func ARRAY_POSITION[E Expression](arr Array[E], elem E, start ...IntegerExpression) IntegerExpression {
return IntExp(Func("ARRAY_POSITION", optionalAppend([]Expression{arr, elem}, start)...))
}
// ARRAY_POSITIONS returns an array of the subscripts of all occurrences of the second argument in the array given as first argument.