Murf
I’m well versed in SQL and priority #1 is performance. Can Kysely still make sense for me?
@Igal Ahhhh, very cool. So I assume you are referring to this? https://kysely.dev/docs/recipes/splitting-query-building-and-execution#compile-a-query
And so we could use Kysely to help manage migrations (your response in #1 and #2) and then compile queries to create type safety, but then have full control over our better-SQLite database query execution by running the Kysely compiled query strings as if it we were just writing our own raw sql without Kysely?!
If I understand this correctly then this is amazing and basically exactly what I wanted!
Thanks so much for your help. You have gained a new user 🙂
17 replies
I’m well versed in SQL and priority #1 is performance. Can Kysely still make sense for me?
@igalk @Igal @koskimas sorry for the re-ping but wondering if you could kindly provide your thoughts on my follow-up questions here in the replied to message? Thanks much!
17 replies
I’m well versed in SQL and priority #1 is performance. Can Kysely still make sense for me?
4. RE: better SQLite and sync vs async. Am I correct though that under the hood you are still interacting with better-SQLite3 synchronously (the way it recommends)? And that the asynchronous behavior is really just you wrapping promises around your abstractions? If that is the case it feels like that really should NOT have performance implications (from SQLite perspective)? Am I understanding correctly? Would you agree? Or are my assumptions mistaken?@koskimas no pressure and just whenever you have a chance to respond, but would love to here your thoughts on my follow-up questions... #4 specifically (also quotes here to be clear) to see if I understood your original response about better-sqlite3 and async vs sync? Thanks!!
17 replies
I’m well versed in SQL and priority #1 is performance. Can Kysely still make sense for me?
One potential is that it seems like it moves the topic back to the top for any messages sent after being marked as solved. So you could mark it as solved and then get in the habit of just responding right after that saying something like “If you have any other questions, let us know”. That seems like it would bump it back to the top as expected 🤔 kind of annoying for you but I think that could work.
17 replies
I’m well versed in SQL and priority #1 is performance. Can Kysely still make sense for me?
This is weird. I thought maybe my post got lost or was inappropriate so got deleted 🤣🤦🏻♂️ but some reason I just had to scroll way down the list to find it 🙏
Thank you @koskimas and @igalk for your responses! Super helpful.
A few more questions im curious about:
1. How does migration work? Not really asking actually how it works cuz I can read the docs, but more about the value Kysely may bring from that perspective?
2. Does Kysely do much with regards to my actually SQLite database? Meaning adding extra tables, columns, changes pragma options etc? One goal is if we use an ORM / query builder that we keep as much control as possible over the DB so that if we moved away from Kysely for example, we wouldn’t have to like refresh our database / clear it out for lack of better word? Hopefully that question makes sense.
3. I presume when using Kysely we eliminate sql injection risk? That your abstractions take care of that for us naturally? What about if we use sql template literal tags with raw sql? Will that still handle sql injection risks for us?
4. @koskimas RE: better SQLite and sync vs async. Am I correct though that under the hood you are still interacting with better-SQLite3 synchronously (the way it recommends)? And that the asynchronous behavior is really just you wrapping promises around your abstractions? If that is the case it feels like that really should NOT have performance implications (from SQLite perspective)? Am I understanding correctly? Would you agree? Or are my assumptions mistaken?
Thanks so much!!
17 replies