clone query?

I have a somewhat unorthodox need. I'd like to create a function to help with pagination, but in order to do this with a single query as the source, I need to be able to clone a query object, because the query methods seem to mutate the original query. example: https://drizzle.run/t0x6docguitgokwue2nnwkyd you can see here that depending on the order of the count query, the results are different. is there an official way of cloning a query object? i've tried with structuredClone to no avail:
DataCloneError: (value) => {
return new Date(this.withTimezone ? value : value + "+0000");
} could not be cloned.
DataCloneError: (value) => {
return new Date(this.withTimezone ? value : value + "+0000");
} could not be cloned.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?