patrick
patrick
Explore posts from servers
DTDrizzle Team
Created by patrick on 7/23/2024 in #help
update multiple rows with uuid id's
without any cast(xxx as uuid)....
3 replies
DTDrizzle Team
Created by patrick on 7/23/2024 in #help
update multiple rows with uuid id's
when I execute this directly against Postgres it succeeds, which is weird...
update shows
set gross = (case when id = '397ac0a7-d8e3-4a2e-8dcf-789ee99638a5' then 1 end)
where id in ('397ac0a7-d8e3-4a2e-8dcf-789ee99638a5')
update shows
set gross = (case when id = '397ac0a7-d8e3-4a2e-8dcf-789ee99638a5' then 1 end)
where id in ('397ac0a7-d8e3-4a2e-8dcf-789ee99638a5')
3 replies
DTDrizzle Team
Created by micaww on 8/14/2023 in #help
Is there a way to declare a custom SQL index?
did this ever happen?
6 replies
TtRPC
Created by patrick on 9/8/2023 in #❓-help
query with no input reports error
also, important data point, it compiles with tsc and esbuild just fine, and runs just fine, this is a VSCode only error!?
4 replies
TtRPC
Created by patrick on 9/8/2023 in #❓-help
query with no input reports error
I just checked and nothing has changed in createTPCReact.tsx in 9 months, so it must be something i am doing wrong.
4 replies
DTDrizzle Team
Created by patrick on 9/6/2023 in #help
drizzle-kit failing with Top-level await is currently not supported with the "cjs" output format
ahh, it seems if i remove my async functions to another file, that fixes it...
6 replies
DTDrizzle Team
Created by patrick on 9/6/2023 in #help
drizzle-kit failing with Top-level await is currently not supported with the "cjs" output format
import { pgTable, serial, text, varchar } from "drizzle-orm/pg-core"; import { db } from "../db"; export const users = pgTable("users", { id: serial("id").primaryKey(), givenName: text("givenName"), surname: text("surname"), email: varchar("email"), }); export type User = typeof users.$inferSelect; // return type when queried export type NewUser = typeof users.$inferInsert; // insert type export async function getUsers(): Promise<User[]> { return await db.select().from(users); } export async function insertUser(user: NewUser): Promise<User[]> { return db.insert(users).values(user).returning(); }
6 replies
DTDrizzle Team
Created by patrick on 9/6/2023 in #help
drizzle-kit failing with Top-level await is currently not supported with the "cjs" output format
it exports a couple of async functions...
6 replies