Closed sbrunk closed 6 months ago
Great catch! These unique things haven't been prioritized or used much (as you can tell), but I hope to build very cool things with indices and foreign keys eventually.
The fix should be very easy, I'll get to it in a day or two :)
I just stumbled upon an error when using
selectByUnique
, which promises to return the full row in the type signature, but only selects the input column in the generated SQL.You can see that in the
Users
example:https://github.com/oyvindberg/typo/blob/53539fa8205327828958748dbd00b78e13bf6813/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala#L86-L91
selectById
in comparison selects the full row as expected:https://github.com/oyvindberg/typo/blob/53539fa8205327828958748dbd00b78e13bf6813/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala#L80-L82