Sveltekit Failed to resolve import "cloudflare:sockets"
Unable to insert rows when using libsql

generate:pg - 0 Tables pnpm Monorepo
drizzle-orm
/drizzle-kit
installed in a single package in my repo.
```...
Bulk update in Postgres w/ Drizzle ?
UPSERT
(ie. insert w/ onConflictDoUpdate
) statement which I'm not fan of for this use case.
I'd really like to be able to do a .update(table).set(arrayOfObjects)
! But it looks like it's not supported....Problem when inserting new record
null value in column "id" of relation "MagicLinks" violates not-null constraint
and in my schema, I have id: uuid('id').primaryKey().defaultRandom()
...BUG: Prepared statements with placeholder values .execute() not working on postgres
Nullable self-reference table relation
Support for relational queries with views
relations
on a view as it is expecting a table as the first argument.
Thanks!...Many to many relationship between one type
How can I order and/or limit rows from leftJoin?
Can someone help me understand these 2 examples using pool and client?
Type Declaration with TypeScript in Monorepo failes
../db/src/schema/products.ts(4,14): error TS2742: The inferred type of 'products' cannot be named without a reference to '../../node_modules/drizzle-orm/db.d-a6fe1b19.js'. This is likely not portable. A type annotation is necessary.
../db/src/schema/products.ts(4,14): error TS2742: The inferred type of 'products' cannot be named without a reference to '../../node_modules/drizzle-orm/db.d-a6fe1b19.js'. This is likely not portable. A type annotation is necessary.
Type error?
Unsafe argument of type `any` inside select where eq query
any
. Correct me if I am wrong because I am a typescript begineer.
Refer to the screenshots attached.
```ts...
How to type results that includes relations ?
Error: Either `connectionString` or `host, port, etc.` params be provided in config file
Setting AUTO_INCREMENT starting value
ALTER TABLE tbl AUTO_INCREMENT = 100;
Is it possible to do that using Drizzle?MySQL varchar gets inferred as MySqlText?
next-auth
adapter help again. Is this my bug or Drizzle's? (Probably Drizzle's because Drizzle STINKS)
TL;DR: MySQL varchars are getting inferred as MySqlText
.
Part of the requirements of next-auth
is to provide a minimum schema but also let folks extend off of it. So, I have a minimum schema built for MySQL and am inferring it's type. But it looks to me like the inferred type of MySQL's varchar
becomes MySqlText
when it gets inferred. The problem with this ends up being that, when folks want to provide their custom table with the varchar (which is correct) they get an error because TS thinks it's supposed to be a MySqlText
....
Problem with infering json type in zod schema
.$type()
helper only works on the type level, it cannot change the runtime behavior. The schema validation happens at runtime, thus it doesn't know about your type. If you want to validate your json field according to your type, you would need to refine the insert schema, like this:
```ts
const TestInsertSchema = createInsertSchema, {
value: () => z.object({ a: z.string(), b: z.number() }),
});...can't execute basic pg cmnds in drizzle orm .
const result = await db.select().from('auth_key')
const result = await db.select().from('auth_key')
e: ReferenceError: auth_key is not defined
e: ReferenceError: auth_key is not defined