Not exactly sst related, but trying to use `RDS` c...
# help
n
Not exactly sst related, but trying to use
RDS
construct and
kysely
. Does anyone know how to select a record with a string like
userId
in js when the column is a uuid type in postgres, currently getting the following error
Copy code
ERROR: operator does not exist: uuid == character varying
t
interesting, haven't tried this yet
n
t
kysely has a discord - would suggest asking there
n
But unsure how to with kysely
t
you can use
Db.raw
for inserting raw sql into a query
he probably would support uuid natively though
Copy code
.where("times_verified", "is", Database.raw("null"))
n
Thanks for the tips @thdxr, i'll shoot them a message and report back 👍
For future travellers, this is possible to achieve, you must cast the uuid as text first though and the uuid you are comparing against must be a valid uuid. To get mine working I can use something that looks like
Copy code
const item = await database.selectFrom('items')
    .selectAll()
    .where(sql`items.item_id::text`, '=', '0ca08fa2-46db-45d6-bb25-d35b8bbbc890')
    .execute();
Where you can replace the hard coded uuid there with whatever uuid you have etc