#Goobie Mysql
1 messages · Page 1 of 1 (latest)
meepen used it in his mysql library too, I only used it for transactions as without it, it will make you chain fuckton of callbacks, kept it simple for other functions as there won't be benefits using coroutines with most sync code which can cause more problems if you forget you are in a coroutine, so it's better to use callbacks for normal queries
What does this bring to the table? Why should I migrate?
main reason for me was not being able to get data inside a transaction, mysqloo restricts the ability to do so, also it being written in rust, makes it more easier to spot bugs and fix, although it cant be way safer than c++ as you are still dealing with c api but it can stop you from mistakes in multithreading
oh and one more good thing, mysqloo spawns a thread for each connection which is fucked, with this you can use all connections you want in 1 thread and they would work without any issues as its just I/O
Neat
@median mortar What would be the difference here with sync vs async? This seems like just using await vs then in javascript eh? I'm looking at the code and both of them basically do the same thing
Ewwww rust
wait_async is the same for block_on, blocks the current thread till the async job is done. but i couldn't use block_on, when you mix some async with sync causes tokio panic, they look like they do the same thing because sqlx is async only so i have to run async code synchronously @left grove