mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
chore: update information
This commit is contained in:
@@ -5,10 +5,10 @@ Everyone is free to utilise either the library or code from it so long as [the l
|
||||
|
||||
- [x] Server Callbacks
|
||||
- [ ] Table utilities
|
||||
- [ ] OxMySQL library
|
||||
- [x] OxMySQL library
|
||||
- [ ] Native wrappers (animations, spawning, etc.)
|
||||
- [ ] Iterators
|
||||
- todo: think of more features
|
||||
- todo: think of more stuff
|
||||
|
||||
### How to utilise ServerCallbacks
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
local ServerCallbacks = {}
|
||||
|
||||
---@param event string
|
||||
---@param delay number prevent the event from being called for the given time
|
||||
local function CallbackTimer(event, delay)
|
||||
if type(delay) == 'number' then
|
||||
local time = GetGameTimer()
|
||||
|
||||
@@ -63,7 +63,7 @@ end
|
||||
---@param query string
|
||||
---@param parameters? table|function
|
||||
---@param cb? function
|
||||
---@return integer|string
|
||||
---@return number|string
|
||||
---returns value of the first column of a single row
|
||||
function MySQL.scalar(query, parameters, cb)
|
||||
oxmysql:scalar(safeArgs(query, parameters, cb))
|
||||
@@ -72,7 +72,7 @@ end
|
||||
---@param query string
|
||||
---@param parameters? table|function
|
||||
---@param cb? function
|
||||
---@return integer result
|
||||
---@return number result
|
||||
---returns number of rows updated by the executed query
|
||||
function MySQL.update(query, parameters, cb)
|
||||
oxmysql:update(safeArgs(query, parameters, cb))
|
||||
@@ -131,7 +131,7 @@ end
|
||||
|
||||
---@param query string
|
||||
---@param parameters? table|function
|
||||
---@return integer|string
|
||||
---@return number|string
|
||||
---returns value of the first column of a single row
|
||||
function MySQL.scalarSync(query, parameters)
|
||||
query, parameters = safeArgs(query, parameters)
|
||||
@@ -144,7 +144,7 @@ end
|
||||
|
||||
---@param query string
|
||||
---@param parameters? table|function
|
||||
---@return integer result
|
||||
---@return number result
|
||||
---returns number of rows updated by the executed query
|
||||
function MySQL.updateSync(query, parameters)
|
||||
query, parameters = safeArgs(query, parameters)
|
||||
|
||||
Reference in New Issue
Block a user