NoelHuibers
TTCTheo's Typesafe Cult
•Created by NoelHuibers on 2/1/2024 in #questions
Drizzle Planetscale "text" in schema (MySQL) "Key specification without key length"
I want a text type in my schema since my long string isn't fitting into a varchar.
When i do this:
I get the error:
vttablet: rpc error: code = InvalidArgument desc = BLOB/TEXT column 'bigtext' used in key specification without a key length (errno 1170)
6 replies
TTCTheo's Typesafe Cult
•Created by NoelHuibers on 1/21/2023 in #questions
Filedownload through tRPC
I try to get a Filedownload working through tRPC.
Currently i'm using useMutation in the Frontend. If invoked, the mutation leads to a fs.readFileSync and converts it to an ascii String. I think this is not ideal since in the Frontend i use useEffect to look after the Change of the mutation to then create a blob and a link to the Blob to download the file.
Ideally i would like to use fs.createReadStream to send the Data as chunks and directly download the Data instead of waiting to recieve it and then have an instant download on my hand.
I'm very open to ideas since finding little Documentation for that problem.
3 replies