stock trade
query https://user-images.githubusercontent.com/103982094/228803165-415ff305-d8d7-49e2-ba93-1359bf69c74f.png
please share your solutions or discuss the solutions in the comments.
Kysely feedback and suggestions for enhancement are also welcome.
9 Replies
v0.24.2 solution https://wirekang.github.io/kysely-playground/?p=f&i=-NSLNa1J1ghEtp8rCN6y
using a helper function to DRY it up. using a single
.where invocation, but could chain multiple invocations for the and - wanted a single eb for all.Nice! Why is that
withTables needed? Didn't the DB used to get merged with the global DB type automatically in the playground?Whenever you start importing stuff, it breaks 😢
why you need sql.lit when using bxp? The bxp example when you hover the function shows .bxp("age","+", 1)
I normally wouldn't, wanted to be 100% matched to the source.
Now you can import stuffs if you wrap
interface DB with declare global
https://wirekang.github.io/kysely-playground/?p=f&i=-NSJaFkfVUzf8Pi8gHmVNoice
Thank you! Updated the solution's playground link.