shikishikichangchang
Explore posts from serversDTDrizzle Team
•Created by shikishikichangchang on 6/9/2024 in #help
Turso SQLite vector search
Does drizzle have support for this?
https://turso.tech/blog/turso-brings-native-vector-search-to-sqlite?webui=true&type=signup&content=ai
4 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 4/10/2024 in #questions
trpc/react not working on AWS
![No description](https://cdn.answeroverflow.com/1227429624091508806/image.png)
28 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 3/29/2024 in #questions
keep previous data
the latest t3 app doesn't support keepPreviousData in useQuery? App router, drizzlem, trpc setup.
2 replies
DTDrizzle Team
•Created by shikishikichangchang on 3/29/2024 in #help
Is there a way in drizzle to return the count before limit and offset?
i have a table that i need to limit and offset that also needs to return the count. is there a way to do this using one query?
1 replies
DTDrizzle Team
•Created by shikishikichangchang on 3/29/2024 in #help
order by dynamic colum
i have a table and i want the user to be able to order by different columns. how do i write the drizzle query to take in a string and do the ordering? Example here: https://orm.drizzle.team/learn/guides/limit-offset-pagination does ordereing as such: .orderBy(users.id).
But for my use case, I won't know until runtime.
22 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 3/23/2024 in #questions
trpc query failing in prod
I'm using trpc's use query together with nextjs 14's server components. The useQuery is in a client component. Everything works perfectly locally, including the productino build. However when I deploy to AWS via sst, it starts failing. Any idea why? This is the error:
SyntaxError: Unexpected non-whitespace character after JSON at position 2.
It shows up in the browser console through loggerLink.
When I inspect on the network tab, it does return the response with the right data. It seems like trpc on the front end isn't able to pass the right stuff to reavt to re-render?
Upon checking the response in detail, I see that there's "62 bf" and "0" at the beginning and the end of the json response respectively. This only happens in the deployed version. Not even on the locla built version.
18 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 3/23/2024 in #questions
retry logic with server action
How do you implement retry logic with server action? I'm using next-safe-action if that matters.
3 replies
KPCKevin Powell - Community
•Created by shikishikichangchang on 3/17/2024 in #front-end
Infinite, scrollable, animated link Cloud
How can I create a component like the one Perplexity has? I have the animation working but if I let the user scroll, the animation gets all messed up. The component needs to have “infinite” items (the one that disappears from the left appears from the right and vice versa), scrollable, and animated.
3 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 3/8/2024 in #questions
nextAuth v5
Has anyone been able to make it work? Tried it and keep getting Error [ERR_MODULE_NOT_FOUND]: Cannot find module
3 replies
DTDrizzle Team
•Created by shikishikichangchang on 3/5/2024 in #help
auto create nanoid
How do I automatically create nanoid using Drizzle for Mysql/planetscale? similar to prisma's cuid.
1 replies
DTDrizzle Team
•Created by shikishikichangchang on 3/3/2024 in #help
how can I truncate all tables in the new drizzle studio? Previously there was a drop down button
tsia
8 replies
DTDrizzle Team
•Created by shikishikichangchang on 2/28/2024 in #help
nested relation
how can I query a model with 2 'with'? So query student with books, with pages, for example.
4 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 2/23/2024 in #questions
Weird cache behavior
I created a new t3 app with app router and trpc. Then I moved CrudShowCase (including the get posts part) to a new route. I realized a weird behavior after adding artificial delay to the get posts api.
1. On initial visit - fetch data from source and takes a while
2. On subsequent visits < 30s: instant page load due to cache
3. On first visit after 30s - fetch data from source and takes a while
4. All visits from here on - fetch data from source and takes a while.
The discrepancy/unexpected outcome is 4. I thought 4 should be the same as 2, in that the cache is reset to the 30s timer and the user would get instant page loads again. But that is not the case. Can someone confirm this is expected or non-expected behavior?
15 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 2/4/2024 in #questions
sensitive file
Is it safe to store a sensitive file in the src (not under "public") directory? Can't seem to find any docs on this. Basically I need that file when a function runs so I run this code:
fs.readFileSync(path.join(process.cwd(), "", "sensitiveFile.text"));
6 replies
DTDrizzle Team
•Created by shikishikichangchang on 11/24/2023 in #help
mysql on delete cascase
Seems like mysql with planetscale does not support "reference". Is there a way to on delete cascase or do I have to do it manually in a transaction?
3 replies
DTDrizzle Team
•Created by shikishikichangchang on 11/24/2023 in #help
Transaction doesn't support Promise.all
This works:
This does not:
77 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
benefits of server actions?
What are the pros and cons of using server actions versus trpc mutation? I think they both have to send a POST request to their server either way?
2 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
shadcn - can only use it in server components?
Tsia
2 replies