san4d
san4d
Explore posts from servers
DTDrizzle Team
Created by san4d on 4/22/2024 in #help
Error with Nested Transactions
Hmm. I haven't found a solution to this yet. I'm in the middle up updating infra and will try again after. One thing you could try: enable DB logging. Double-check that the SQL generated is what you expect.
5 replies
DTDrizzle Team
Created by Shad on 4/16/2024 in #help
Query `count` returning the wrong value
Your group by should look like
groupBy(users.id, organizationMemberships.id)
groupBy(users.id, organizationMemberships.id)
I'm not sure about the count.
3 replies
DTDrizzle Team
Created by SandCat on 4/15/2024 in #help
Cascade doesn't work
Can you provide some code examples? I use this feature fine in Drizzle. Make sure you're specifying the attribute on the table definition:
parentId: uuid('parent_id')
.references(() => parent.id, { onDelete: 'cascade' })
.notNull(),
parentId: uuid('parent_id')
.references(() => parent.id, { onDelete: 'cascade' })
.notNull(),
5 replies
DTDrizzle Team
Created by san4d on 1/31/2024 in #help
Error when making a websocket-based transaction on an AWS Lambda Function
Updated my question with the solution: adding bufferutil. I learned about it on the ws npm docs: https://www.npmjs.com/package/ws#opt-in-for-performance Could be worth updating the drizzle docs somewhere.: https://orm.drizzle.team/docs/get-started-postgresql#neon
3 replies
DTDrizzle Team
Created by san4d on 1/31/2024 in #help
Error when making a websocket-based transaction on an AWS Lambda Function
I found this in the neon docs (https://neon.tech/docs/serverless/serverless-driver#use-the-driver-over-websockets):
Please note that Drizzle Kit does not support the Neon serverless driver — you'll have to use a standard Postgres driver with Drizzle Kit, like node-postgres or postgres.js.
Is this still accurate?
3 replies
DTDrizzle Team
Created by san4d on 10/8/2023 in #help
Type Generated from $inferInsert does not change after column type update
Looking at the pg-core code, this behavior is expected:
export type PgNumericBuilderInitial<TName extends string> = PgNumericBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgNumeric';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export type PgNumericBuilderInitial<TName extends string> = PgNumericBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgNumeric';
data: string;
driverParam: string;
enumValues: undefined;
}>;
I expect it has something to do with the arbitrary precision.
5 replies
DTDrizzle Team
Created by san4d on 10/8/2023 in #help
Type Generated from $inferInsert does not change after column type update
This happened again with a different table in a different project. Both cases involved the numeric type.
5 replies
DTDrizzle Team
Created by san4d on 10/8/2023 in #help
Type Generated from $inferInsert does not change after column type update
Yes. I'm using VS Code if that helps.
5 replies
CDCloudflare Developers
Created by san4d on 9/4/2023 in #pages-help
The Workers runtime failed to start on Fedora Linux
I cleared all of my processes and am able to get the binding working on wrangler 3.6.0. However, it only works with prebuilt assets (pnpm build && wrangler pages dev ./dist). I haven't gotten it working with hot reloading, as suggested in the documentation (wrangler pages dev --compatibility-date=2023-08-14 --proxy 3000 -- astro dev)
3 replies
CDCloudflare Developers
Created by san4d on 9/4/2023 in #pages-help
The Workers runtime failed to start on Fedora Linux
3 replies