Jökull Sólberg
Explore posts from serversDTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
Screenshot of hover?
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
so you don't need it, just leave it out
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
so if you call typeof on a function you wrap it in returntype to get the return of the function --- however in your case above you're calling returntype on a result, not a function
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
typeof
basically "yanks" a runtime thing into the type level above it (that's how I think about it)16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
and call it like this
getItemOrder.prepare()
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
leave
.prepare()
out of the variable16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
Can you share the code? It's probably not a function that's being passed to ReturnType
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
?
16 replies
DTDrizzle Team
•Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
ReturnType<typeof query.run>
16 replies
DTDrizzle Team
•Created by Jökull Sólberg on 5/25/2023 in #help
Simulate enums with SQLite `CHECK()`
got it - thanks
12 replies
DTDrizzle Team
•Created by Jökull Sólberg on 5/25/2023 in #help
Simulate enums with SQLite `CHECK()`
Or even
dataType() { return "TEXT CHECK( role IN ('admin','user') )" }
?12 replies
DTDrizzle Team
•Created by Jökull Sólberg on 5/25/2023 in #help
Simulate enums with SQLite `CHECK()`
Awesome! I guess I could add the
CHECK
in the migration if I want, for DB consistency too12 replies