I am trying to filter a select query with a uuid which is of string type, and I don't know how to cast it into a std::uuid:
const image = await db.select(db.Image, (image) => ({
filter: db.op(image.uuid, '=', 'b6b8993a-b836-4cad-84d1-ca9695c82f17'),
^^^^^^^^^^
// Type '"std::uuid"' is not assignable to type '"std::str"'.
}))
I guess I have to transform the string into a Buffer, but it would be awesome if edgeql did that automatically. Or maybe have a built-in helper function to make the cast easy?
I am trying to filter a select query with a uuid which is of
string
type, and I don't know how to cast it into astd::uuid
:I guess I have to transform the string into a Buffer, but it would be awesome if edgeql did that automatically. Or maybe have a built-in helper function to make the cast easy?
Thanks