zerokelvin
Explore posts from serversDTDrizzle Team
•Created by zerokelvin on 9/18/2024 in #help
How do I order by average rating?
I have a table of facilities and reviews for facilities which I can join via the facilityTable.id = review.facilityId columns. I want to select the top ten according to average reviews. How can I do that? Here's what I have so far:
10 replies
PPrisma
•Created by zerokelvin on 9/2/2024 in #help-and-questions
cacheStrategy in local dev
https://www.prisma.io/docs/accelerate/local-development#using-prisma-accelerate-client-extension-in-development-and-production specifies how to use prisma accelerate client extension in local development, but it's incomplete. Most of my prisma queries have the cacheStrategy property specified. This works fine in production with the accelerate client, but fails with the non-accelerate client.
Is the best practice here to just go through and comment out 50+ instances of cacheStrategy before developing your app locally and then uncomment it later when pushing?
4 replies
DTDrizzle Team
•Created by zerokelvin on 4/29/2024 in #help
Drizzle incorrectly building query with DEFAULT instead of $11 in insertion
Drizzle ORM built this query:
Here's the query:
Why do
majestic_backlink_count
and majestic_referring_domain_count
not have values like $11
? This is resulting in data being set to NULL
instead of the number value I've specified. How do I fix this?5 replies
PPrisma
•Created by zerokelvin on 3/29/2024 in #help-and-questions
[ACCELERATE] Timed out fetching a new connection from the connection pool
I'm using Prisma Accelerate with the @prisma/client/edge client and I'm getting the following error:
In following the "more info" link, it specifies how to resolve this issue for non-Accelerate connection strings, but following this doesn't work for my Accelerate connection string. I tried adding just about every combination of
-pooler
, connection_limit=100
, pgbouncer=true
but none of them work (and I'm still getting the same connection limit number in the error).
How do I resolve this?
Unfortunately I'll probably need to remove Prisma accelerate if I'm unable to resolve this soon2 replies
CDCloudflare Developers
•Created by zerokelvin on 12/4/2023 in #general-help
Cloudflare batch image upload does not work
Has anyone succeeded in getting the batch image upload endpoint to work? I'm getting the following error:
and it looks like some other people have the same issue: https://community.cloudflare.com/t/images-batch-api-gets-error-code-103-forbidden-endpoint/586747
1 replies
DTDrizzle Team
•Created by zerokelvin on 9/18/2023 in #help
Why is my query so much slower when filter by all four latitude/longitude bounds than just three?
When I uncomment out any of the latitude / longitude filters, the response latency spikes from ~50ms to 2000ms. (a similar query on prisma runs in just ~60ms, even with all filters.). Does anyone have an idea why? Or how I could fix this? Unfortunately, migrating to PostGIS is not an option at the moment
11 replies
DTDrizzle Team
•Created by zerokelvin on 7/11/2023 in #help
Internal server error: Error connecting to database: fetch failed
I'm trying to send the following query to my db but it eventually times out, throwing an error:
If I comment out the
facilities
query, the city
query returns just fine, so I don't think there's anything wrong with my env setup or connector code. This is also the same query that I previously sent via prisma (or at least, my best attempt at recreating it), and it worked there, so I don't think the query is failing due to its intrinsic size.
Any ideas as to how to resolve this issue?6 replies
DTDrizzle Team
•Created by zerokelvin on 7/7/2023 in #help
How do I use Drizzle both locally in node and deployed on Vercel Edge?
I'm having some trouble with Drizzle + Postgres, deployed to Vercel. I can either get it working when deployed to vercel edge with my db connector like:
But then it doesn't work locally in dev, with the following error:
(I tried following the instructions there doesn't seem to resolve the issue, and just introduces node dependencies into my app, which then can't run on Vercel Edge).
If I instead just set it up with
Then it works locally in dev, but fails to build (with the same issue of node dependencies can't be deployed to Vercel Edge).
This is all in the context of a Qwik app (but I don't think this detail impacts the issue). How can I resolve this issue so that it works both locally in node dev and also deployed to Vercel Edge?
1 replies