Proper query results inference

Posting my GitHub discussion here for more visibility: https://github.com/drizzle-team/drizzle-orm/discussions/583
GitHub
Proper query results inference · drizzle-team drizzle-orm · Discuss...
I currently need to use SelectResult to type a function argument, but this type is only available from the generated types file: import { b as SelectResult } from "drizzle-orm/select.types.d-c...
M
machour336d ago
@Andrew Sherman I'd definitely appreciate if you can give this a look 🙏 I've been postponing a launch for a few days now
AS
Andrii Sherman336d ago
Yeah I'm here cc @Dan Kochetov can you have a look please? I guess you can identify types issues faster I'll check it also
M
machour336d ago
Thank you both in advance!
B
bloberenober336d ago
commented on GitHub
Want results from more Discord servers?
Add your server
More Posts
Drizzle with Next 13.4.2 & Vercel Postgres TimeoutHi all. I'm trying out NextJS server actions and Drizzle for the first time. I have it hooked up tI think I don't really understand migrations local sqlite.It's a local sqlite db (`DB_URL=file:dev.db`) in a nextjs & trpc setup. I'm trying drizzle for the fConnecting to Vercel PostgresI'm trying to connect to Vercel Postgres like this: ```ts import { drizzle } from "drizzle-orm/verceinsertID not returned correctly when using custom UUID```export const users = mysqlTable("users", { id: varchar("id", { length: 36 }) .primaryKey() weird ilike postgres behaviorhi, I have a very weird issue when trying to filter using ilike in postgres, both my local instance Cannot make a .all() query on an empty table (Bun SQLITE)I am new to SQLITE but i'm unable to make a .all() query on an empty table in a Bun with Drizzle proSelf referencing nullable ID field not assigneable in a `eq` statementI am not sure if I encountered another edge case but basically I have a self-referencing table whereCustom `Select` object returns type `any`Databases like Planetscale do not support FK constraints. As I understand I can manipulate the returschema generates wrong indexI have this schema: ```js export const historyFiles = pgTable('history_files', { id: serial('id'MySQL (Planetscale): Cannot read properties of undefined (reading 'name')Hi Hopefully someone can help me. I'm getting the above error in my insert query. ```ts try { cDeploying Next.js w/ Drizzle on Vercel with TurborepoI have a turborepo with Next.js using `drizzle-orm` as a shared package. A bit of context - I'm usiuuid missing in drizzle-orm/mysql-core?There is a uuid method in the drizzle-orm/pg-core package, but none in the mysql-core package. What DatabaseError: Duplicate column name 'id'hey guys, i have a problem in my query but cannot figure out what is causing it. ```ts const cournumeric returns string when querying with Postgres``` export const order = pgTable( 'orders', { ... totalValue: numeric('total_value', { precisiNeed help transform a nested prisma query to drizzleHey I'm trying to translate the following prisma query to drizzle: ```ts const invite = await prisType error for eq()I get `Expected 1 arguments, but got 2.` in a statement like this: ```js .where(and(eq(menu.id, for