Get raw query from toSQL

I trying to figure out if drizzle has a function or helper built in that builds the raw query returned from toSQL
right now toSQL returns params and sql as an object, i would like to get the raw sql query

this is what im doing now to achieve this, any alternatives or is there a something drizzle provides i missed thanks

buildQuery(query: string, params: unknown[]) {
    let index = 1;

    return query.replace(/\$\d+/g, () => {
      const value = params[index - 1];
      index++;

      return `'${value}'`;
    });
  }
Was this page helpful?