Linden
fbc2542136
fix(utils/parseTransaction): properly handle arrays of queries
2023-07-19 20:16:23 +10:00
Linden
45aadf7442
refactor(logger): only enable profiling with debugging
...
Breaks slow query warnings, but most people just set the number higher
once they get warnings anyway.
Also fixes some issues:
- profile duration formatting and time (sec to ms).
- incorrect log query/param index.
2023-07-12 15:38:47 +10:00
Linden
bdbe86c0f7
fix(database): handle profiles for >100 statements in batch queries
...
Profiling is limited to the last 100 queries on a connection.
Clearing profiles after every 100th query should work well enough.
2023-07-12 13:18:55 +10:00
Linden
e57a983bc0
refactor(database/rawTransaction): per-query profiling
2023-07-12 11:24:03 +10:00
Linden
197b92891a
refactor(database): query profiling
2023-07-11 18:40:03 +10:00
Linden
fa0068e798
refactor(database): use mysql2/promise
...
Better code-flow.
Other minor changes to config.
Remove profiling (temp).
2023-07-11 16:33:01 +10:00
Linden
11b21f8ed2
refactor(db): rename serverReady variable
2023-06-13 02:23:33 +10:00
Linden
bc8a874743
refactor(database): waitForConnection
2022-11-08 17:29:05 +11:00
Linden
8fe63bc88a
chore: update dependencies and patch
2022-09-21 13:57:55 +10:00
Linden
d80615bddc
fix(db): handle errors during callbacks
...
Handles errors that would previously disappear into the void or show as 'undefined'.
In Lua this would only occur if yielding during the query callback response.
Cross runtime error handling is suffering.
2022-06-26 04:02:50 +10:00
Niek
fd8ab04f1a
fix(error-events): Add invokingResource to error data ( #129 )
2022-06-26 04:01:05 +10:00
Niek
655ee7309f
feature: Add event to error handling ( #128 )
2022-06-22 02:32:22 +10:00
Linden
c07fa4a451
refactor(transaction): support new transaction syntax
...
Adds a third accepted syntax for transactions, distinct from the mysql-async
compatible implementations.
2022-04-21 13:25:40 +10:00
Linden
7b01898959
refactor(transaction): individual transaction logging
...
I should bother patching mysql2 types, but idc
2022-03-27 08:55:20 +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
dd05cb8e68
refactor(database): response is always a callback now
2022-03-25 05:38:18 +00:00
Linden
afc04fc553
fix(db): move query responses to their own try block
...
Other resources with script errors (notably "attempt to index a nil value") would mistakenly report the query as failed, and people would assume ANY reported errors were because of oxmysql, even through it was their own awful script.
No errors should be thrown in oxmysql when an error occurs in a function reference.
2022-03-07 15:13:07 +11:00
Linden
e0a2a41870
fix(db/rawTransaction): Await scheduleTick
2022-03-02 22:56:07 +11:00
Linden
ec53b3282d
refactor(utils/scheduleTick): Await database connection
2022-02-25 17:11:28 +11:00
Linden
2ea78f1b1b
Merge branch 'refactor' into main
2022-02-14 22:23:28 +11:00
dunak-debug
4498dddbac
WIP: Rewrite to TS & Cleanup
2021-12-26 02:21:46 +01:00