moustacheful
moustacheful
Explore posts from servers
DTDrizzle Team
Created by moustacheful on 2/19/2025 in #help
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.
1 replies
DTDrizzle Team
Created by moustacheful on 2/18/2025 in #help
is there any way to represent runtime values in drizzle?
example:
WITH numbers AS (
VALUES (1), (2), (3), (4)
)
SELECT * FROM numbers LIMIT 1;
WITH numbers AS (
VALUES (1), (2), (3), (4)
)
SELECT * FROM numbers LIMIT 1;
1 replies
DTDrizzle Team
Created by moustacheful on 2/7/2025 in #help
recommendation on changing data type of column?
what's the recommended approach here, e.g. changed from text -> double precision and I got this expected error error: column "time_waiting_for_builds" cannot be cast automatically to type double precision i'm wondering how to go around these kind of things. would editing the resulting migration sql be an anti pattern? is there a recommended approach to do these things?
2 replies
TtRPC
Created by moustacheful on 3/24/2024 in #❓-help
React-query options not available in trpc/react-query?
I'm not sure if I'm misunderstanding something, but i'm trying to use the keepPreviousData option like this:
trpc.method.useQuery({ input: 'blah' }, { keepPreviousData: true })
trpc.method.useQuery({ input: 'blah' }, { keepPreviousData: true })
however, it seems like that option does not exist in the trpc react? it doesn't work nor it's suggested as a possible option. i'm on v11 beta 316
1 replies