You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constArgs=Schema.struct({accountId: Schema.number,// ULIDFromBuffer: Schema.Schema<Buffer, ULID>ids: Schema.array(ULIDFromBuffer),});exporttypeArgs=Schema.To<typeofArgs>;exportconstquery=(args: Args)=>pipe(Sql.tag,Effect.bindTo("sql"),Effect.bind("input",()=>Schema.encode(Args)(args)),Effect.map(({ input, sql })=>sql`SELECT * FROM my_events WHERE account_id = ${input.accountId} AND aggregate_id IN ${sql(input.ids)}`));
I would expect the produced SQL query to be something of the following shape:
SELECT*FROM my_events WHERE account_id = ? AND aggregate_id IN (?)
However, in reality, we're getting:
SELECT*FROM my_events WHERE account_id = ? AND aggregate_id IN (`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
A ulid, when encoded as a binary, is 16 bytes long (explains 0...15).
Given:
I would expect the produced SQL query to be something of the following shape:
However, in reality, we're getting:
A ulid, when encoded as a binary, is 16 bytes long (explains 0...15).
For more details, see Discord: https://discord.com/channels/795981131316985866/1148264145314127913
The text was updated successfully, but these errors were encountered: