From d2753fb2fd8e8848afde560f5a5f5daa054e5c0b Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Tue, 23 May 2023 02:16:59 +1000 Subject: [PATCH] keywords --- .../Functions/Client/Inventory/GetItemCount.md | 4 ++++ .../Functions/Client/Inventory/Search.md | 4 ++++ docs/ox_target/Usage/Globals.md | 13 +++++++++++++ docs/oxmysql/Usage/insert.md | 4 ++++ docs/oxmysql/Usage/prepare.md | 2 -- docs/oxmysql/Usage/query.md | 8 ++++++-- docs/oxmysql/Usage/scalar.md | 4 ++++ docs/oxmysql/Usage/single.md | 2 -- docs/oxmysql/Usage/transaction.md | 4 ++++ docs/oxmysql/Usage/update.md | 12 ++++++++---- 10 files changed, 47 insertions(+), 10 deletions(-) diff --git a/docs/ox_inventory/Functions/Client/Inventory/GetItemCount.md b/docs/ox_inventory/Functions/Client/Inventory/GetItemCount.md index 3c8a82c8..666063e8 100644 --- a/docs/ox_inventory/Functions/Client/Inventory/GetItemCount.md +++ b/docs/ox_inventory/Functions/Client/Inventory/GetItemCount.md @@ -1,3 +1,7 @@ +--- +keywords: ['hasitem'] +--- + Get the total item count for all items in the player's inventory with the given name and metadata. ```lua diff --git a/docs/ox_inventory/Functions/Client/Inventory/Search.md b/docs/ox_inventory/Functions/Client/Inventory/Search.md index 61c417ca..87866957 100644 --- a/docs/ox_inventory/Functions/Client/Inventory/Search.md +++ b/docs/ox_inventory/Functions/Client/Inventory/Search.md @@ -1,3 +1,7 @@ +--- +keywords: ['hasitem'] +--- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/ox_target/Usage/Globals.md b/docs/ox_target/Usage/Globals.md index 0e871fe0..b56819da 100644 --- a/docs/ox_target/Usage/Globals.md +++ b/docs/ox_target/Usage/Globals.md @@ -1,3 +1,16 @@ +--- +keywords: [ + 'addGlobalObject' + 'addGlobalPed' + 'addGlobalPlayer' + 'addGlobalVehicle' + 'removeGlobalObject' + 'removeGlobalPed' + 'removeGlobalPlayer' + 'removeGlobalVehicle', + ] +--- + Registers options that will apply to all entities of that type (object, ped, player, vehicle). ```lua diff --git a/docs/oxmysql/Usage/insert.md b/docs/oxmysql/Usage/insert.md index 421c8ea5..0e3e6370 100644 --- a/docs/oxmysql/Usage/insert.md +++ b/docs/oxmysql/Usage/insert.md @@ -1,3 +1,7 @@ +--- +keywords: ['execute', 'insert'] +--- + # Insert Inserts a new entry into the database and returns the insert id for the row, if valid. diff --git a/docs/oxmysql/Usage/prepare.md b/docs/oxmysql/Usage/prepare.md index 412baf29..15fd06d6 100644 --- a/docs/oxmysql/Usage/prepare.md +++ b/docs/oxmysql/Usage/prepare.md @@ -15,7 +15,6 @@ When using SELECT, the return value will match `query, single, or scalar` depend ```lua -- alias: exports.oxmysql:prepare --- alias: MySQL.Async.prepare MySQL.prepare('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result) if result then @@ -28,7 +27,6 @@ end) ```lua -- alias: exports.oxmysql:prepare_async --- alias: MySQL.Sync.prepare local result = MySQL.prepare.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}) if result then diff --git a/docs/oxmysql/Usage/query.md b/docs/oxmysql/Usage/query.md index 4e28dd5a..dfcbe996 100644 --- a/docs/oxmysql/Usage/query.md +++ b/docs/oxmysql/Usage/query.md @@ -1,3 +1,7 @@ +--- +keywords: ['execute', 'fetchall'] +--- + # Query Generic function that can be utilised for any query. @@ -9,7 +13,7 @@ When selecting data it will return all matching rows and columns, otherwise it w ```lua -- alias: exports.oxmysql:query --- alias: MySQL.Async.query +-- alias: MySQL.Async.fetchAll -- alias: exports.ghmattimysql:execute MySQL.query('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result) @@ -26,7 +30,7 @@ end) ```lua -- alias: exports.oxmysql:query_async --- alias: MySQL.Sync.query +-- alias: MySQL.Sync.fetchAll -- alias: exports.ghmattimysql:executeSync local result = MySQL.query.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}) diff --git a/docs/oxmysql/Usage/scalar.md b/docs/oxmysql/Usage/scalar.md index ccc58d7d..2290ffcf 100644 --- a/docs/oxmysql/Usage/scalar.md +++ b/docs/oxmysql/Usage/scalar.md @@ -1,3 +1,7 @@ +--- +keywords: ['scalar', 'fetchscalar'] +--- + # Scalar Returns the first column for a single row. diff --git a/docs/oxmysql/Usage/single.md b/docs/oxmysql/Usage/single.md index da18b0f5..aebde285 100644 --- a/docs/oxmysql/Usage/single.md +++ b/docs/oxmysql/Usage/single.md @@ -8,7 +8,6 @@ Returns the columns for a single row. ```lua -- alias: exports.oxmysql:single --- alias: MySQL.Async.fetchSingle MySQL.single('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(row) if row then @@ -21,7 +20,6 @@ end) ```lua -- alias: exports.oxmysql:single_async --- alias: MySQL.Sync.fetchSingle local row = MySQL.single.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}) if row then diff --git a/docs/oxmysql/Usage/transaction.md b/docs/oxmysql/Usage/transaction.md index 283083c8..70664488 100644 --- a/docs/oxmysql/Usage/transaction.md +++ b/docs/oxmysql/Usage/transaction.md @@ -1,3 +1,7 @@ +--- +keywords: ['transaction'] +--- + # Transaction A transaction executes multiple queries and commits them only if all succeed. If one fails, none of the queries are committed. The return value is a `boolean`, which is the result of the transaction. diff --git a/docs/oxmysql/Usage/update.md b/docs/oxmysql/Usage/update.md index 48b1f728..1eb022e2 100644 --- a/docs/oxmysql/Usage/update.md +++ b/docs/oxmysql/Usage/update.md @@ -1,3 +1,7 @@ +--- +keywords: ['execute'] +--- + # Update Returns the number of affected rows by the query. @@ -40,9 +44,9 @@ end MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], (affectedRows) => { if (affectedRows) { - console.log(affectedRows) + console.log(affectedRows); } -}) +}); ``` ### Promise @@ -50,8 +54,8 @@ MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, p ```js // alias: exports.oxmysql.update_async -const id = MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]) +const id = MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]); if (affectedRows) { - console.log(affectedRows) + console.log(affectedRows); } ```