sqldelight
sqldelight copied to clipboard
Bitwise query placeholder uses type instead of `Int`
SQLDelight Version
2.1.0-SNAPSHOT
SQLDelight Dialect
postgres
Describe the Bug
I have the following table:
CREATE TABLE profile (
id CHARACTER VARYING(36) AS UserId NOT NULL PRIMARY KEY REFERENCES account(id),
interestedInGenders INTEGER AS GenderList NOT NULL
);
interestedInGenders is using a custom type GenderList which is just an inline value class of type Int. I do some bit masking there.
When using a query:
SELECT * from profile WHERE interestedInGenders & :gender > 0
the generated parameter type of gender is of type GenderList. This is correct & works. However it would be much nicer if the & is used, the underlying real type is used instead of the aliased one.
Stacktrace