8 Commits
Author SHA1 Message Date
Linden f9c33be0fe refactor: rename exports
Removes _callback suffix from exports and bring some exports out of deprecation (single, scalar, etc).

"Sync" exports still use _async.
2021-12-24 03:08:06 +11:00
Linden 452d1ad5ee fix(execute): incorrect queryCount when sending single array
An array containing parameters, rather than arrays, is always a single query.
2021-12-23 19:50:21 +11:00
Linden 36dd8ddd14 refactor: utilise new exports and deprecate old ones
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.
2021-12-23 14:15:17 +11:00
Linden e5c5fc3b1b refactor(execute): split into execute and query
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.
2021-12-23 13:56:31 +11:00
Linden 860af3ff14 refactor(transaction): parse arguments prior to establishing connection
Rather then acquiring a connection, throwing an error, then closing the connection.
2021-12-23 13:51:20 +11:00
Linden 0afb32858d refactor(utils): rename parser and add additional functions
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.
2021-12-23 13:47:25 +11:00
Linden f5e25e3574 refactor(config): moved typeCast function into config 2021-12-23 13:42:12 +11:00
Linden 35f198f2b5 refactor(pool): cleanup connection options and createPool defaults
Additionally perform initial database connection as part of this module, rather than index.
2021-12-23 13:40:54 +11:00