lordbinbash
lordbinbash
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Boolean is not really a real thing - https://www.sqlite.org/datatype3.html#boolean_datatype
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Yeah, thanks a lot, SQLite datatypes are a bit weird so not sure how possible this would even be 🤔
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Conditional returning, returning wrong types
I'm more just worried about the type saying something exists, when it may or may not exist 🥶
16 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Conditional returning, returning wrong types
Yeah not too worried about the undefined thing, was just playing around and noticed some weird behaviour. But in the case of a conditional returning, the return type is a drizzle issue?
16 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Yeah SQLite, but in SQLite BOOLEAN actually has affinity of numeric, it's weird. https://www.sqlite.org/datatype3.html#affinity_name_examples
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Conditional returning, returning wrong types
Yeah this seems wrong
const user: {
id: number;
age: number;
}
const user: {
id: number;
age: number;
}
16 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Conditional returning, returning wrong types
tsconfig -
{
"compilerOptions": {
"target": "ES2022",
"lib": ["dom", "dom.iterable", "ES2022"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"moduleDetection": "force",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"noImplicitOverride": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] }
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
".eslintrc.cjs",
"**/*.ts",
"**/*.tsx",
"**/*.cjs",
"**/*.mjs"
],
"exclude": ["node_modules", ".next"]
}
{
"compilerOptions": {
"target": "ES2022",
"lib": ["dom", "dom.iterable", "ES2022"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"moduleDetection": "force",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"noImplicitOverride": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] }
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
".eslintrc.cjs",
"**/*.ts",
"**/*.tsx",
"**/*.cjs",
"**/*.mjs"
],
"exclude": ["node_modules", ".next"]
}
16 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Maybe best to just stick with INTEGER
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
The main issue so far is working with BOOLEAN it gets introspected to numeric() which can accept any string. This is correct, but I'm not sure if it's desired considering Drizzle's mode: "boolean". IIRC pushing with mode: boolean results in INTEGER, but introspecting BOOLEAN results in numeric()
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Writing the schema w/ Drizzle is not realistic unfortunately, we have checks + triggers etc.
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
Well we are using Drizzle in our Next.js app, to perform queries etc. But the actual DB is declared via an Atlas hcl schema. We interact with the DB through the Next.js app (route handlers, server components etc), but we also have another Go backend depending on the same DB
20 replies
DTDrizzle Team
Created by lordbinbash on 7/10/2024 in #help
Any tips for using Drizzle without the schema declared via Drizzle syntax?
For more context, our BE is in Go and FE in Typescript. Drizzle works great when schema is declared in TS but I'm not sure how realistic it would be to maintain this in the long run, manually updating the drizzle schema
20 replies
DTDrizzle Team
Created by lordbinbash on 6/21/2024 in #help
Introspect poor accuracy (SQLite/Turso)
@zachr you’re having issues with introspect too?
4 replies
CDCloudflare Developers
Created by Gian on 9/18/2023 in #general-help
R2 custom metadata not being set
Same issue, did you find a solution to this?
7 replies