K
Kysely•5mo ago
Tim Lonsdale

Is there a way to execute parameterized SQL (with paremeters) within a kysely migration?

I have a third party library that requires I make some changes to the database. I want to run this as part of my other kysely migrations. This library gives me an array of [sql : string, parameters : unknown[]]. Any idea how best I should run these as part of a kysely migration?
1 Reply
Igal
Igal•4mo ago
Hey 👋 Try:
await db.executeQuery(CompiledQuery.raw(sql, parameters));
await db.executeQuery(CompiledQuery.raw(sql, parameters));

Did you find this page helpful?