Linden
d4e367baaf
fix(lib): Allow transactions to utilise safeArgs function
...
- Also updates luadocs
2021-10-16 10:24:00 +11:00
Linden
ce87bc488c
fix(parser): Allow queries with multiple placeholders and no parameters
...
- '...?, ?, ?', {nil, nil, nil} will set all placeholders to null
2021-10-16 10:20:35 +11:00
Linden
dc55401b78
fix: Return boolean for TINYINT
2021-10-16 10:20:35 +11:00
Linden
3b55e890a8
fix: Display correct query execution time
2021-10-16 10:20:35 +11:00
Linden
bacd9c171d
chore: Point mysql2 dependency to fork
...
I'd like some control over incoming changes to fit our use-case, and patch-package doesn't quite fulfil our needs.
2021-10-16 10:20:35 +11:00
Linden
29d28197bb
chore: Version bump dependencies
2021-10-16 10:20:35 +11:00
Linden
4646c6f027
fix: Assign object entries to array
...
Assigning the entries to an array first permits comparing the lengths and setting undefined entries as null
2021-10-16 10:20:35 +11:00
Linden
30a391031b
fix: Resolve error when parameter length does not match
...
- Throws a more specific error when receiving mismatch for column and value counts
- Resolves error when final parameter is nil
2021-10-16 10:20:35 +11:00
Linden
22de50c081
Apply mysql2 patch
...
- Remove extra _resolveNamedPlaceholders call from query
- Apply several patches by github/testn (pending merge); refer to pull requests #1408 , #1402 , #1401 , #1400
- Optimise query.row call
- Cache lazy-evaluated field
- Optimise string decoding
- Avoid leaking TextRow/BinaryRow
2021-10-16 10:20:35 +11:00
Linden
d0730c5e9b
feat: Add support for nil parameters
...
- Throws an error if no params are defined when using named parameters, otherwise seems okay
2021-10-16 10:20:35 +11:00
Linden
b781f0ca45
feat(lib): Setup support for lua docs
2021-10-15 18:41:17 +11:00
Linden
31959beb85
fix(manifest): Disable server_only
...
- Until dependencies can be used for server only resources, disable this to prevent clients failing to load.
2021-10-11 03:22:55 +11:00
Linden
de2c731295
chore: Update comments for function return values
2021-10-08 15:58:11 +11:00
H@mer and Linden
93ff6bae45
fix: Incorrect exports used in sync functions for transaction, single, and insert
...
* Fix insert return worng value.
* fix: Use the correct functions for execute/fetchAll
Co-authored-by: Linden <[email protected] >
v1.5.1
2021-10-08 14:00:47 +11:00
Linden
1266f4a7b6
chore: Update dependencies and version bump
2021-10-08 11:17:50 +11:00
Linden
a06cf65d10
feat(lib): safeArguments function to assert types
...
- Ensures each argument has the expected type
- Refactor each function for reduced code duplication
- Correctly check Store for number queries (Async functions did not retrieve string)
2021-10-08 05:51:07 +11:00
Linden
5b55c81046
chore: Update readme
2021-10-08 05:47:34 +11:00
dunak-debug
6acd0ac352
chore: Bump to 1.5.0
v1.5.0
2021-10-06 23:52:38 +02:00
Dunak
55d8d46334
feat(ci): Include mysql-async compat library
2021-10-06 22:59:46 +02:00
Linden
4b179191d4
feat: Imports file for "mysql-async" like usage
...
- Include `server_script '@oxmysql/lib/MySQL.lua'` in the resource manifest
Mostly untested
2021-10-07 07:42:03 +11:00
Linden
1ec52903ca
feat: Add support for semicolon connection strings
2021-10-07 06:26:07 +11:00
Linden
7e5d4cce06
chore: Version bump and set to production
v1.4.1
2021-09-27 10:13:36 +10:00
Linden
681b39692a
fix(pool): Increase default connection timeout
...
- Servers taking a while to start may experience a timeout; this should alleviate the issue
2021-09-27 10:13:11 +10:00
1A3
39c485644d
fix: Regex fix for queries with commas ( #31 )
...
Fixes #24
2021-09-24 20:13:01 +02:00
darksaid98
634bbffd46
feat: version check on startup ( #28 )
2021-09-23 20:55:08 +02:00
Linden
273a4a8a89
Merge pull request #27 from gixels/main
...
Implemented the ability to change the port.
2021-09-23 05:03:27 +10:00
gixels
b8249d5457
Implemented the ability to change the port.
2021-09-22 12:12:50 -04:00
dunak-debug
372a95632c
refactor: Transaction tweaks and version bump 1.4.0
v1.4.0
2021-09-20 17:32:58 +02:00
darksaid98
faae020dd4
feat: Added transactions support ( #20 )
...
* feat: transactions
* Adds transactions function
* Adds query & param parser with ghmattimysql compatability
* feat: transaction exports
* Adds exports for using transactions
* feat: set transaction isolation level on start
* feat: accept mysql-async syntax
* fix: acquire connection from pool
* refactor: syntactic sugar in transaction.js
* feat: optional error logging
* It ain't pretty but it gets the job done.
* Revert "feat: optional error logging"
This reverts commit fdff479f34b7575c240334cff0f4f12d03e0d48f.
* feat: transaction isolation level convar
* fix: requested changes
2021-09-20 16:48:24 +02:00
dunak-debug
5e89d62688
chore: Bump version to 1.3.5
...
- Removed unused ts-loader
v1.3.5
2021-09-20 13:45:55 +02:00
dunak-debug
51ac8d1e8c
refactor: Use logical OR operator when checking callback parameter
2021-09-20 13:39:46 +02:00
dunak-debug
466f230dc4
fix: Allow passing callback as second parameter
2021-09-20 13:36:07 +02:00
dunak-debug
06b106151f
fix: Return null if query failed, show callback warning only in debug
2021-09-20 13:35:43 +02:00
Dunak
a0573c8623
Merge pull request #22 from BerkieBb/main
...
Multi-game support
v1.3.4
2021-09-19 21:38:22 +02:00
BerkieBb
076e327c9a
feat: Change game to common to enable support for other game like rdr3
2021-09-19 20:41:30 +02:00
Linden
c5f150e003
improvement: Only display warnings if callback is defined
...
- Non-function callbacks will display a warning.
- This makes the third argument optional for async queries.
v1.3.3
2021-09-19 04:25:42 +10:00
dunak-debug
4b2b564591
chore: Bump version to 1.3.2
v1.3.2
2021-09-18 12:45:37 +02:00
dunak-debug
3f57c566df
feat: Show error trace if debug is enabled
2021-09-18 12:45:15 +02:00
Linden
5e6547611b
refactor: safeCallback provides a warning, rather than an error
...
- The query does in fact proceed, but does not send a result
2021-09-18 11:08:21 +10:00
Linden
be221b70d3
feat: Enable JS sync exports if wrapper.lua is not loaded
v1.3.1
2021-09-18 10:28:40 +10:00
Linden
f7dea332de
improvement: Provide information when callback fails
2021-09-18 10:27:16 +10:00
Linden
d2758de972
tweak: Query execution times are less precise unless using debug mode
2021-09-18 10:24:06 +10:00
dunak-debug
c9acb09d08
refactor: Execute now return whole result object
v1.3.0
2021-09-17 22:19:49 +02:00
dunak-debug
73ad12ed02
refactor: Show error type of nil params
2021-09-17 22:19:26 +02:00
dunak-debug
4654460e22
fix: Don´t throw error if parameter is zero or false, check for undefined
2021-09-17 20:01:47 +02:00
dunak-debug
e23ba224aa
fix: Execute export result checking
2021-09-17 18:09:11 +02:00
dunak-debug
878a2eb6c0
fix: **Use query instead of execute always**
...
- mysql2 typeCast doesn´t work on prepared statements
2021-09-17 18:06:03 +02:00
dunak-debug
290e23c190
refactor: Split files into src folder, fix parser
2021-09-17 17:20:17 +02:00
dunak-debug
546eebe1cf
fix: Typo in wrapper
2021-09-17 17:19:30 +02:00
dunak-debug
fd4fa877ec
fix: Patch named placeholders, throw errors on nil values
2021-09-17 17:19:18 +02:00