Closed Qrokqt closed 5 months ago
O is the expression's type. You should use the type the db returns. Kysely doesn't touch the data types. It's left to the underlying driver (mysql2 in this case). Figure out what it returns for those and update your table interface types accordingly.
We use mysql and are trying to convert from knex but we have a number of columns in binary formats. For ids when selecting we use
BIN_TO_UUID
and inserting/updating we useUUID_TO_BIN
. For spatial columns we similarly useST_AsGeoJSON
andST_GeomFromGeoJSON
. What should we tell kysely the type of those columns are?Also, what does the O in the raw builder represent? If I put
string
for everything it seems to all work, but it would be nice to know why