Meexa
Explore posts from serversDTDrizzle Team
•Created by Meexa on 8/24/2024 in #help
Providing optional columns to insert query results in type error
12 replies
How to do filepath as a param in an RPC route?
Hey, I'm trying to fetch a file/folder with an RPC route and want to add the filepath to the URL as a param, but this doesn't work because then I get a 404.
Example:
/api/folders/:filepath -> /api/folders/foo/bar/baz
This results in a 404 because of the extra slashes is my guess.
I tried with a wildcard and that works when I use curl/fetch, but I don't know how to add the filepath to the url using RPC
/api/folders/folder/* ->
api.folders.folder['*'].$get()
<- how to add /foo/bar/baz
to this?
So I don't think wildcard is the way to go here, but I can't find anything about catch-all params or anything in the docs.7 replies
DTDrizzle Team
•Created by Meexa on 2/28/2024 in #help
What should the driver be in drizzle.config.ts when using bun sqlite?
I get an error when I leave out
driver
in my drizzle config
I tried better-sqlite but then it asks me to install better-sqlite31 replies
DTDrizzle Team
•Created by Meexa on 1/9/2024 in #help
Error: Cannot open database because the directory does not exist
This is my config (in root)
My client file (
/src/db/index.ts
)
sqlite.db
is in the root of my project4 replies
DTDrizzle Team
•Created by Meexa on 12/7/2023 in #help
How to do "onConflictDoUpdate" when inserting an array of values?
I want to add multiple rows to my table but it has a unique key, so it has to update the row if there is a conflict. How do I do this with the ORM?
16 replies
DTDrizzle Team
•Created by Meexa on 11/21/2023 in #help
sqlite insert results in error: "SQLite error: no such table: main.__old_push_items"
2 of my 3 table insert work fine, but my
auctions
table inserts do not work for some reason. When I try to insert data into my sqlite db on Turso I get the following error:
Versions
Insert code uses Zod to validate, which it passes succesfully
I also tried raw sql insert but it gives the same error
7 replies
DTDrizzle Team
•Created by Meexa on 8/18/2023 in #help
Update column A with the value of column B
I want to update column B with an updated value of column A
So, something like this
Obviously doesn't work this way, but what would be the way to do it in Drizzle?
6 replies
DTDrizzle Team
•Created by Meexa on 8/16/2023 in #help
SQL_PARSE_ERROR: SQL string could not be parsed: near LP, "None"
Full error:
I'm getting this error with this query. Is the query correct? Trying to get a list of characters that are not in the DB yet from a list of IDs
schema
8 replies
DTDrizzle Team
•Created by Meexa on 8/15/2023 in #help
Drizzle can't find local sqlite file
I'm trying to play around with sqlite but I can't seem to connect my config and local sqlite db file.
Config:
The sqlite db file is in the root of my project, just like the drizzle config
I've also set up this file in
src/db/index.ts
Error:
5 replies
TTCTheo's Typesafe Cult
•Created by Meexa on 5/7/2023 in #questions
How do I add "connect social platform" to my website? (not social login)
I'm not sure how to describe this feature. It's basically this from Twitch
https://www.twitch.tv/settings/connections
Has anyone implemented something like this before?
11 replies
TTCTheo's Typesafe Cult
•Created by Meexa on 4/18/2023 in #questions
Does anyone know of a nice starting template for a React component npm package?
I want to make a React component and publish it to NPM but cba setting it up myself and invent the wheel again. Is there a nice starting point for this that I can use? Needs TypeScript of course. Maybe Vite or something for dev.
7 replies
DTDrizzle Team
•Created by Meexa on 4/17/2023 in #help
How do I get the values of an insert inside a transaction?
I have this transaction where I create a project and add variables and a history of those variables. I need the IDs of the variables for
variables_history
. How can I get those values?
12 replies
DTDrizzle Team
•Created by Meexa on 4/12/2023 in #help
How do I connect to sqlite on fly.io?
I followed the instructions on fly.io on how to setup a project using sqlite. I believe I did it all correctly. I've created a volume and an app and I've linked the volume to the app. Now I don't know how to connect to the sqlite db on there. On local I simply do
new Database('sqlite.db')
but I don't know what to use on fly.io. There are no docs on fly.io about this either, and I already asked on their forums.
Has anyone done this before? 🙂15 replies
DTDrizzle Team
•Created by Meexa on 4/6/2023 in #help
"The supplied SQL string contains more than one statement" after running "generate:sqlite"
I just updated one of my schemas with a few columns and now my project is broken.
This is the generated SQL
5 replies
DTDrizzle Team
•Created by Meexa on 3/30/2023 in #help
SQLite migrations are not being applied
First time using SQLite and drizzleORM, so forgive me if this is a stupid question. I've been trying to set this up for an hour now.
I have installed drizzleORM and drizzle-kit, I've added the setup from the docs and I have ran my first migration with
drizzle-kit generate:sqlite
. I have a db file in my root and folder with the migration that creates a users
table.
I get an error when I try query the users
table, saying it does not exist.30 replies
TTCTheo's Typesafe Cult
•Created by Meexa on 2/9/2023 in #questions
Back/forward browser buttons download my website instead of going there
This problem is so fucking weird, I don't even know where to begin. It happens both on local and on prod. It happens on all browsers. I'm using Next 13 app dir, maybe it's a bug? Does anyone have any clue or has experience this before?
It happens on the homepage only. Copy this link and paste it in your URL bar, press enter, press back, then forward. Your browser will download a file called "en".
https://www.wowvalor.app/en
I have 1 redirect in my Next config for this route, although it also happens on /de, /es, etc
4 replies