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:
3 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
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