Closed arthurfiorette closed 3 weeks ago
Not always data is organized in an array form and even currently it appears work with Set<>, TS type checker gets mad and only allows arrays.
Set<>
db .selectFrom('Table') .select('field') .where('id', 'in', mySet) // breaks typings! .execute()
Which leads to having to write many .where('id', 'in', Array.from(mySet)) calls which could be avoided.
.where('id', 'in', Array.from(mySet))
Best approach would be to allow all kinds of objects that extends Iterable<T, void, void> in parameters.
Iterable<T, void, void>
They'd still get turned into arrays internally. It's better to be explicit.
Not always data is organized in an array form and even currently it appears work with
Set<>
, TS type checker gets mad and only allows arrays.Which leads to having to write many
.where('id', 'in', Array.from(mySet))
calls which could be avoided.Best approach would be to allow all kinds of objects that extends
Iterable<T, void, void>
in parameters.