When using callback functions and throwing an error (i.e. attempt to index a nil value), it would respond about an error in a nested ref call.
Don't catch callback errors.
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.
query refers to the old execute function.
preparedStatement renamed to execute.
Parse arguments before establishing connection.
Utilise response function to determine and return correct values to the export.
execute now accepts an array of values when performing a single query, rather than requiring an array within an array.
Create a handler for ScheduleResourceTick.
Handle serverReady function and isReady state.
Rewrite parameter parser to wrap all export arguments, ensure parameter and callbacks, and improve placeholder resolution.
Setup a response function to handle export return values.
People are experiencing errors that I've been unable to reproduce, but 1.8.3 apparently works fine.
Revert changes that were made.
This disables slow query warnings for now.
Moved getConnection and ScheduleResourceTick above the try block.
Moved connection.release into the finally block
Increased default connection timeout to 1 minute.
Unnecessary dependency with functionality that can be easily handled via PerformHttpRequest.
Since the check references fxmanifest instead, we will no longer maintain the version in package.json.
* feat: Add an export to call prepared queries
- Utilises pool.execute (rather than query) to actually prepare parameters through mysql.
This is intended for appropriately built queries utilising placeholders and parameters, and should only be used on frequently repeated queries.
* refactor(prepare): Clean up results and add total execution time
* feat(prepare): Send scalar response for a single value
* fix(prepare): Check if result exists before getting keys