icarus
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
but thank you for the attempt anyway
16 replies
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
yeah I wish there was a simple .transform function available on all types similar to zod's
16 replies
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
here you go https://drizzle.run/vq6b9jghc22sjfexzxqe71br
16 replies
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
think something like the following, for the sake of simplicity
16 replies
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
i do need to use a custom type. to do some custom encoding/decoding to the integer coming from/going to the database
16 replies
DTDrizzle Team
•Created by icarus on 10/31/2024 in #help
A way to make a custom type generatedAlwaysAsIdentity
all issues related to this on github were closed with the release of generatedAlwaysAs and generatedAlwaysAsIdentity, but none of those two actually fix this issue as you can't do something like:
16 replies
DTDrizzle Team
•Created by LeFuncq on 11/22/2023 in #help
Create unique slugs with $defaultFn
you're welcome :)
7 replies
DTDrizzle Team
•Created by LeFuncq on 11/22/2023 in #help
Create unique slugs with $defaultFn
i've also been looking into doing something like that recently, i think the best approach that'd work for you with how drizzle is currently is to create a trigger in the database layer, and have it fill your generated column on every insert
7 replies
DTDrizzle Team
•Created by NotLuksus on 4/4/2023 in #help
"Extend" tables by other tables
yea the table builders just take regular js objects for columns, so u can simply do something like this:
2 replies
DTDrizzle Team
•Created by icarus on 3/30/2023 in #help
drizzle-orm/mysql-core has no InferModel or MySqlRawQueryResult exports
Oh that makes sense, thanks for the clarification :)
27 replies
DTDrizzle Team
•Created by icarus on 3/30/2023 in #help
drizzle-orm/mysql-core has no InferModel or MySqlRawQueryResult exports
Yes I just figured that part out, importing
InferModel
from drizzle-orm
works, but MySqlRawQueryResult
seems to be missing still.27 replies