The decision was made to allow the empty slice as a valid slice input in SQLair. When the slice is empty no input placeholders are generated for the slice (e.g. ... IN ($S[:]) => ... IN ()).
In Go, the nil slice is often used interchangeably with the empty slice (since append works on both) however, when a nil slice is passed to SQLair, it returns the error "need supported value, got nil".
The behavior for nil slices should match that for empty slices to give a consistent user experience.
The decision was made to allow the empty slice as a valid slice input in SQLair. When the slice is empty no input placeholders are generated for the slice (e.g.
... IN ($S[:])
=>... IN ()
).In Go, the nil slice is often used interchangeably with the empty slice (since append works on both) however, when a nil slice is passed to SQLair, it returns the error
"need supported value, got nil"
.The behavior for
nil
slices should match that for empty slices to give a consistent user experience.