Skip to content

Latest commit

 

History

History
73 lines (67 loc) · 1.81 KB

MGet.mdx

File metadata and controls

73 lines (67 loc) · 1.81 KB

import { Tabs, Tab } from 'nextra-theme-docs';

MGet

The mget function returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned. Because of this, the operation never fails.

Params

  • Keys(*) is the array of keys that you want to get the values.
  • Function(OPTIONAL) is the function that will be executed when the query is finished.

Return

If you've specified a function it will return the result of the query in the function, if not it will return the result of the query.

Functions

<Tabs items={["Exports", "Library"]}>

exports["ice_mysql"]:RedisMGet(keys, function)
```lua MySQL.Redis.RedisMGet(keys, function) ```

Use

Awaitable

<Tabs items={["Lua", "JS", "C#"]}>

local result = MySQL.Redis.RedisMGet({"key1", "key2", "key3})
```js const result = await MySQL.Redis.RedisMGet(["key1", "key2", "key3"]) ``` ```cs var result = await MySQL.Redis.RedisMGet(new string[] {"key1", "key2", "key3"}) ```

Callback

  • Callback will return the same as the awaitable function but in the callback function.
  • If the callback is not provided it will return the same as the awaitable function.
  • If you want to make the query to execute in the main thread you have to specify a simple function like this: () => {} to do anything depending on the language. <Tabs items={["Lua", "JS", "C#"]}>
```lua MySQL.Redis.RedisMGet({"key1", "key2", "key3}, function(result) print(result) end) ``` ```js MySQL.Redis.RedisMGet(["key1", "key2", "key3"], (result) => { console.log(result) }) ``` ```cs MySQL.Redis.RedisMGet(new string[] {"key1", "key2", "key3"}, (result) => { Console.WriteLine(result) }) ```