Only allow manual error handling when using the await/sync methods,
or when calling the default exports.
Async/Callback returns need to throw errors for compatibility.
This reverts commit 7582973e4e.
Calling coroutine.yield causes issues with the Lua scrt's scheduling. Notably, calling Citizen.Wait will result in the thread never being resumed.
i.e.
MySQL.Async.fetchAll = MySQL.query
MySQL.Sync.fetchAll = MySQL.query.await
MySQL.Async.fetchScalar = MySQL.scalar
MySQL.Sync.fetchScalar = MySQL.scalar.await
More information in issue #77
Exports now utilise more accurate names to reflect their behaviour, with less confusion for JS users (await executeSync is no more).
Exports return promises or callback results directly to reduce promise chaining.
Promise exports now fully utilise JS, with Lua being removed from the resource - version checking runs through JS instead.
Various improvements to lib/MySQL as well as introduction of a prepare wrapper.
- Ensures each argument has the expected type
- Refactor each function for reduced code duplication
- Correctly check Store for number queries (Async functions did not retrieve string)