canonical / sqlair

Friendly type mapping for SQL databases
Apache License 2.0
17 stars 9 forks source link

Add type support for slice inputs #130

Closed Aflynn50 closed 8 months ago

Aflynn50 commented 9 months ago

This PR adds support for binding slice types to statements and passing slice values to queries is added using the syntax added in #114.

Slices can now be used in input expressions. For example: SELECT ... FROM p WHERE id IN ($S[:]) A slice can be used anywhere that an input expression can be used in the query, they are not limited to just IN clauses.

This PR also adds a type sqlair.S of type []any which can be used to avoid having to declare a custom type.