Linden
ff00cd0e82
fix(utils/parseArguments): check parameter truthiness
2022-08-24 18:41:05 +10:00
Linden
77f0d32e07
fix(update): correct semver comparison
2022-08-23 20:14:58 +10:00
Linden
f0dd9ce1a6
fix(utils): named placeholders check
...
Should always check parameters is an object (and not an array).
2022-08-13 17:12:48 +10:00
Linden
71c32f9d2f
tweak(utils): check if namedPlaceholders are enabled
...
Named placeholders were being converted regardless of config flag.
2022-08-13 16:23:47 +10:00
Linden
521aa8f03d
refactor: move connectionOptions to config
...
We'll also ensure namedPlaceholders is boolean and export the object.
2022-08-13 16:22:45 +10:00
Linden
7796c80f69
feat(config): add command to modify mysql_debug
...
Allow toggling debug prints for specific resources during runtime.
2022-08-12 19:47:30 +10:00
Linden
c92d1f3219
tweak(logger): mysql_debug array-check
...
If the convar output is an array, check if the query was invoked by
a resource in mysql_debug.
2022-08-12 18:56:22 +10:00
Linden
fca0b66fc8
tweak(config): accept a JSON array for mysql_debug
2022-08-12 18:54:32 +10:00
Linden
211d678b8d
chore(fxmanifest): update description
...
oxmysql has always worked with RedM, but habit leads to FiveM bias.
2022-08-09 03:03:57 +10:00
Manifest Bumper
8c89c70a4e
chore: bump manifest version to v2.4.0
2022-07-28 04:57:13 +00:00
Linden
8ea5aad876
ci(release): version bumper
2022-07-28 14:54:38 +10:00
Linden
613570167c
feat: provide exports for ghmattimysql
...
Rather than people weirdly renaming the resource, just provide event
handlers for ghmattimysql exports.
2022-07-28 14:48:23 +10:00
Linden
1477812b38
refactor(lib/lua): improve definitions
...
Improve return types and support callbacks.
2022-07-12 14:23:39 +10:00
Linden
1b8bf6a081
refactor(lib/lua): safeargs type checks and cb reassignment
2022-07-12 13:33:53 +10:00
Luke
3e1426a859
chore(lib): bump package version
...
for whatever reason 1.1.0 had an older version of the js file
2022-07-11 19:30:24 +02:00
Linden
31212e0198
refactor(lib/ts): improve typing and methods
2022-07-12 00:47:06 +10:00
Luke
e982bd7f89
feat(lib): readme for npm package
2022-07-10 21:49:33 +02:00
Luke
3b93df03ef
ci(release/pre-release): copy only lua lib files
2022-07-10 17:42:32 +02:00
Luke
91985638e2
feat: oxmysql exports wrapper as node package
...
https://www.npmjs.com/package/@overextended/oxmysql
2022-07-10 17:14:16 +02:00
Luke
a8e2973a86
chore: update discord link in readme
2022-07-06 18:29:47 +02:00
Linden
bdd4814f06
fix(update): return if current version is higher than release
...
The version checker will report a "major update" if fxmanifest's version
is higher than the latest release (a tag has not been pushed).
2022-06-26 22:56:25 +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
Linden
db0f29db42
fix(utils/parseTransaction): check for array
2022-06-26 04:01:11 +10:00
Niek
fd8ab04f1a
fix(error-events): Add invokingResource to error data ( #129 )
2022-06-26 04:01:05 +10:00
Linden
5fc56caddf
fix(db/rawQuery): handle uncaught promise
...
oxmysql is unexpectedly catching errors thrown by the Lua runtime
when an error occurs during a function reference.
This lead to an 'undefined' error being thrown, specifically when
yielding a thread during the function reference.
Not really an oxmysql bug, so this should just be a temporary workaround.
2022-06-24 14:14:37 +10:00
Niek
655ee7309f
feature: Add event to error handling ( #128 )
2022-06-22 02:32:22 +10:00
Linden
15884fbc82
refactor: error handling
...
Meant to push this before release.
Ensures errors are handled as before, regardless of using exports
or lib/mysql; for compatibility.
2022-06-18 16:32:07 +10:00
Linden
a709f67e99
chore: version bump
2022-06-18 14:19:50 +10:00
Linden
a76ce68e9c
fix(db): supportBigNumbers
...
BIGINT columns will lose precision at a certain length.
This connection flag will typecast to a string in those situations.
Resolves #121 .
2022-06-18 14:14:03 +10:00
Linden
bccd6a1035
fix: error handling when using callbacks
...
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.
2022-06-17 21:40:27 +10:00
Linden
21e73c17b8
refactor(db/execute): mysql2 callback api
...
Attempt #2 ; last attempt had some connection issue.
Minor performance improvement, more noticeable with bulk queries.
2022-06-16 18:09:09 +10:00
Linden
7496cf0400
feat(lib): handle errors inside invoking resource
...
Make the source of the error more apparent.
2022-06-04 14:54:20 +10:00
Linden
340ca48012
refactor: error handling
...
Add boolean to disable throwing error for query.
Reject promises when using _async exports.
Return errors as strings instead of Error (fails to serialise).
Fixes #122
2022-06-04 14:50:49 +10:00
Linden
2e751a3537
chore: version bump
2022-05-16 04:46:26 +10:00
Linden
db5fe3e557
fix(utils/parseExecute): executeType fails when query has multiple lines
2022-05-15 03:25:41 +10:00
Linden
56729ef9c1
fix(db): ignore errors during ref call
2022-05-12 08:49:29 +10:00
Linden
7752b7fc12
chore: update packages
2022-05-12 08:48:18 +10:00
Luke
dadc7ff15f
feat: Lerna
...
Links root and ui packages together, running `pnpm i` in the root folder will also install deps in the ui folder, same with the build script.
2022-05-02 21:03:35 +02:00
Linden
fc0c025db2
Update README.md
2022-04-30 04:37:05 +10:00
Linden
fda3cab3b5
chore: version bump
2022-04-30 04:14:28 +10:00
Linden
5d69db51da
refactor(database): new URI parser
2022-04-30 04:13:31 +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
da83eff989
revert(execute): transaction api
...
Somebody, somewhere, will experience compatibility issues with any
change made to oxmysql.
2022-04-21 12:07:47 +10:00
Linden
57bf223a7d
refactor(lib/lua): safeArgs error messages
2022-04-18 23:08:59 +10:00
Luke
b8d2e16ed6
feat(ci): Automatic fxmanifest bumping
2022-04-13 19:33:30 +02:00
Linden
23bcf90885
refactor(update): add convar for mysql_versioncheck
...
For those who don't like to be reminded of updates.
Also don't report errors during fetch, since it doesn't matter to users.
2022-04-03 06:14:21 +11:00
Linden
050eef58b9
fix(execute): revert to promise api
...
Several reports of increased chances to hit a deadlock since v2.2.2, and
three reports of a timeout during prepare since v2.2.4.
Simpler to revert to the old prepare function and api (with improvements)
than to work out the solution.
Look into rewriting prepare in the future or including the mariadb connector,
which doesn't suffer from the same perf issues.
2022-04-03 06:10:13 +11:00
Linden
fa1cdcc668
fix(execute): incorrect response parsing
...
Fixes several regressions and issues from ef0dfaa .
Sending a single parameter would set 'single' to true, ignoring multiple
results from the database and returning 'null'.
SELECT should not trigger transactions, not the other way around.
Results should not be parsed when no callback is defined.
2022-04-03 03:52:07 +11:00
Linden
9511af734b
chore: update version
2022-04-03 01:27:51 +11:00
Linden
9ef9b0d8c9
fix(utils/typeCast): typeerror
...
BLOB's with a value of null cannot be iterated, resulting in an
error while trying to return [...field.buffer()].
Minor change to weird typecasting on date values.
2022-04-02 19:52:58 +11:00