Commit Graph
11 Commits
Author SHA1 Message Date
Linden 0caaec43e4 fix(utils/parseExecute): only set undefined parameters to null
Falsey values (e.g. empty string) should not be set as null.
2023-07-06 12:56:44 +10:00
Linden 8a340d60e3 refactor(utils/parseExecute): allow other methods through prepare calls 2023-07-06 12:52:14 +10:00
Linden 283e3194cf fix(utils/parseExecute): incorrect parameter reassignment 2022-11-08 16:57:02 +11:00
Linden 25f8feb793 fix(execute): handle nil values in nested arrays
Lua tables are msgpacked with the "without_hole" setting.
Nested tables being sent with "prepare" failed to account for
nil values in tables unpacking into objects.
2022-11-08 15:17:01 +11:00
Linden db5fe3e557 fix(utils/parseExecute): executeType fails when query has multiple lines 2022-05-15 03:25:41 +10:00
Linden ef0dfaac84 refactor(execute): remove mysql2 promise api
Changing from promises to callbacks gives ~20% increased performance.
Single prepared statements won't use transactions (no extra overhead).
2022-03-30 05:54:54 +11:00
Linden 9fec9cccba refactor(execute): don't use transactions for SELECT statements 2022-03-27 07:11:00 +11:00
Linden 3582e72122 refactor(execute): use transactions and parse values
Parse each value while iterating prepared statements, ensuring
objects are remapped to arrays and NULL values are properly
inserted.

Utilise transactions to rollback changes in the event of an error.
2022-03-25 19:00:29 +11:00
Linden dea98f7c5b refactor(database): move from mysql2/promise to callback api
Micro-optimisation for rawQuery. rawExecute and rawTransaction will
still utilise the promise api (pool.promise()).
2022-03-25 06:07:57 +00:00
Linden 86d85dfa00 fix(execute): handle nil parameters in prepared statements
Lua tables are msgpacked with the 'without_hole' setting, resulting
in an object. rawQuery already handles this and converts an object
into an array (filling null where appropriate).

Give rawExecute the same treatment.
2022-03-25 04:41:39 +00:00
dunak-debug 4498dddbac WIP: Rewrite to TS & Cleanup 2021-12-26 02:21:46 +01:00