mmurto
mmurto
Explore posts from servers
RRailway
Created by mmurto on 9/10/2024 in #✋|help
Two accounts linked to one GitHub account
Thanks!
9 replies
RRailway
Created by mmurto on 9/10/2024 in #✋|help
Two accounts linked to one GitHub account
Thanks! Can I link another email to that team workspace?
9 replies
RRailway
Created by mmurto on 9/10/2024 in #✋|help
Two accounts linked to one GitHub account
N/A
9 replies
TTCTheo's Typesafe Cult
Created by Liam on 6/12/2023 in #questions
Unique Constraint in Drizzle
You're welcome! That probably means that drizzle doesn't support the NULLS/NOT/DISTINCT paramenters here: https://www.postgresql.org/docs/current/indexes-unique.html
6 replies
TTCTheo's Typesafe Cult
Created by Liam on 6/12/2023 in #questions
Unique Constraint in Drizzle
Add a unique index like the emailIdx here https://orm.drizzle.team/docs/indexes-constraints#indexes
6 replies
DTDrizzle Team
Created by sevenwestonroads on 4/22/2023 in #help
Using Drizzle as a package in Turborepo doesn't work ?
Then just don't install drizzle-orm anywhere else, but import what is needed from @mono/database.
13 replies
DTDrizzle Team
Created by sevenwestonroads on 4/22/2023 in #help
Using Drizzle as a package in Turborepo doesn't work ?
I have the same setup - I have this in my @mono/database/index.ts and everything works flawlessly:
export * from "./schema";
export * from "drizzle-orm";
export { type PostgresJsDatabase } from "drizzle-orm/postgres-js";
export * from "./schema";
export * from "drizzle-orm";
export { type PostgresJsDatabase } from "drizzle-orm/postgres-js";
13 replies
TTCTheo's Typesafe Cult
Created by mmurto on 4/11/2023 in #questions
Handle trailing slash in NextJS API routes?
Never mind, stupid error on reading the Fibery docs 🙂
3 replies
DTDrizzle Team
Created by mmurto on 4/9/2023 in #help
How to filter length in where for postgres?
Thanks a lot!
4 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Thanks! I'll try to fix that, thought of it as well but the versions in package.json's were the same, so thought they resolved to the same.
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Sorry bout the formatting 🙂
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Here's the tsc log:
@dcmnt/api:type-check: > @dcmnt/[email protected] type-check /Users/nn/Code/mm/dcmnt/packages/api
@dcmnt/api:type-check: > tsc --noEmit
@dcmnt/api:type-check:
@dcmnt/api:type-check: src/service/project.ts(27,12): error TS2345: Argument of type 'SQL<unknown>' is not assignable to parameter of type 'SQL<unknown> | ((aliases: { id: MySqlColumn<{ data: string; driverParam: string | number; notNull: true; hasDefault: true; tableName: "Project"; }>; name: MySqlColumn<{ data: string; driverParam: string | number; hasDefault: false; notNull: true; tableName: "Project"; }>; description: MySqlColumn<...>; createdAt: My...'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").SQL<unknown>' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").SQL<unknown>'.
@dcmnt/api:type-check: Types of property 'queryChunks' are incompatible.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk[]' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk[]'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk'.
@dcmnt/api:type-check: Type 'Name' is not assignable to type 'Chunk'.
@dcmnt/api:type-check: Property 'encoder' is missing in type 'Name' but required in type 'Param<unknown, unknown>'.
@dcmnt/api:type-check:  ELIFECYCLE  Command failed with exit code 2.
@dcmnt/api:type-check: ERROR: command finished with error: command (/Users/nn/Code/mm/dcmnt/packages/api) pnpm run type-check exited (1)
@dcmnt/api:type-check: > @dcmnt/[email protected] type-check /Users/nn/Code/mm/dcmnt/packages/api
@dcmnt/api:type-check: > tsc --noEmit
@dcmnt/api:type-check:
@dcmnt/api:type-check: src/service/project.ts(27,12): error TS2345: Argument of type 'SQL<unknown>' is not assignable to parameter of type 'SQL<unknown> | ((aliases: { id: MySqlColumn<{ data: string; driverParam: string | number; notNull: true; hasDefault: true; tableName: "Project"; }>; name: MySqlColumn<{ data: string; driverParam: string | number; hasDefault: false; notNull: true; tableName: "Project"; }>; description: MySqlColumn<...>; createdAt: My...'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").SQL<unknown>' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").SQL<unknown>'.
@dcmnt/api:type-check: Types of property 'queryChunks' are incompatible.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk[]' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk[]'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk'.
@dcmnt/api:type-check: Type 'Name' is not assignable to type 'Chunk'.
@dcmnt/api:type-check: Property 'encoder' is missing in type 'Name' but required in type 'Param<unknown, unknown>'.
@dcmnt/api:type-check:  ELIFECYCLE  Command failed with exit code 2.
@dcmnt/api:type-check: ERROR: command finished with error: command (/Users/nn/Code/mm/dcmnt/packages/api) pnpm run type-check exited (1)
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
The db package has:
{
"extends": "../../tsconfig.json",
"include": [
"./**/*.ts"
]
}
{
"extends": "../../tsconfig.json",
"include": [
"./**/*.ts"
]
}
and the server package:
{
"extends": "../../tsconfig.json",
"include": ["src", "index.ts", "transformer.ts"]
}
{
"extends": "../../tsconfig.json",
"include": ["src", "index.ts", "transformer.ts"]
}
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Sure! The root one:
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [".eslintrc.cjs"]
}
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [".eslintrc.cjs"]
}
10 replies
TTCTheo's Typesafe Cult
Created by mmurto on 3/13/2023 in #questions
How to get context type of protectedProcedure?
Do you mean infer or inferred type? I'm trying to get the type to use as the input for a function, so not sure how they work for that.
5 replies
TTCTheo's Typesafe Cult
Created by mmurto on 3/13/2023 in #questions
How to get context type of protectedProcedure?
I'm not sure how exactly.
5 replies
TTCTheo's Typesafe Cult
Created by utdev on 2/20/2023 in #questions
Delete file from s3 using presigned urls
Not sure of why the presigned url doesn't work, but is there a reason why you don't delete it directly in the handler after you delete the data from database?
3 replies
TTCTheo's Typesafe Cult
Created by mmurto on 2/20/2023 in #questions
How to redirect from login page with trpc's SSR enabled?
Thanks, that's probably it!
3 replies