san4d
Explore posts from serversDTDrizzle Team
•Created by san4d on 4/22/2024 in #help
Error with Nested Transactions
I'm experiencing an issue with nested transactions on neon serverless 0.9.1, drizzle-orm 0.30.9, and ws 8.16.0.
The following works locally but not in production:
The following works in production but not locally:
I'd expect the 1st (parent-child transactions) to work. Instead, I get a 25P01 error
NO_ACTIVE_SQL_TRANSACTION
with message
error: ROLLBACK TO SAVEPOINT can only be used in transaction blocks\n at file:///var/task/dist/server/entry.mjs:148485:23\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _NeonTransaction.transaction
5 replies
DTDrizzle Team
•Created by san4d on 4/11/2024 in #help
Parameterized Interval in Where Clause
I'm trying to write a query that uses an interval as a parameter. The SQL looks like this and works fine:
When I try to write it using drizzle, it also works fine if a hard code the interval:
However, it does not work if I try to parameterize the interval like this:
or this:
I get this error
Error: could not determine data type of parameter $3I tried this and got this error
operator does not exist: interval < timestamp with time zoneSince the raw SQL works, I must be missing something in the ORM usage. Any suggestions? I'm running Postgres 16 on neon using drizzle 0.30.7.
1 replies
DTDrizzle Team
•Created by san4d on 1/31/2024 in #help
Error when making a websocket-based transaction on an AWS Lambda Function
Problem
I'm seeing this error when I try to make a connection:
I'm able to make HTTP calls no problem.
Setup
- Node 18.v20 Runtime on AWS Lambda
- Postgres 16 on Neon
- @Neondatabase/serverless v0.6.1
- drizzle-orm v0.29.3
- ws v8.16.0
Ask
Has anyone ran into this before? If so, what did you you need to change? I'm looking into the
bufferUtil2.mask
error currently.
Solution
I figured out that I needed to add bufferutil as an optional dependency:
3 replies
DTDrizzle Team
•Created by san4d on 10/8/2023 in #help
Type Generated from $inferInsert does not change after column type update
![No description](https://cdn.answeroverflow.com/1160649820726370324/Screenshot_from_2023-10-08_14-37-39.png)
5 replies
CDCloudflare Developers
•Created by san4d on 9/4/2023 in #pages-help
The Workers runtime failed to start on Fedora Linux
Hello!
I'm deploying a vanilla Astro website using pages. I'm now trying to connect that website to a D1 instance. When I start wrangler, I see an error stating that "✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above." The D1 binding I set up in the console is properly registered locally, and there are no additional logs related to the startup failure. I'm currently running the cloudflare plugin in advanced mode.
I've attempted to follow these instructions to no avail:
- https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/#use-bindings-in-your-astro-application
- https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes
I'm running Fedora Linux 38, wrangler 3.6.0, astro 3.0.7, and version 7.0.1 of the astro cloudflare plugin.
3 replies