Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adonisjs/redis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.3
Choose a base ref
...
head repository: adonisjs/redis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.3.4
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 14, 2023

  1. added hmset to ioMethods.ts (#58)

    * added hmset to ioMethods.ts
    
    * Revert "added hmset to ioMethods.ts"
    
    This reverts commit 71bebfe.
    
    * fix(iomethods.ts added hmset): added hmset in iomethods.ts
    isimisi authored Sep 14, 2023
    Copy the full SHA
    c80075a View commit details
  2. chore(release): 7.3.4

    Julien-R44 committed Sep 14, 2023
    Copy the full SHA
    acbf6cc View commit details
Showing with 30 additions and 1 deletion.
  1. +1 −1 package.json
  2. +1 −0 src/ioMethods.ts
  3. +28 −0 test/redis.spec.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adonisjs/redis",
"version": "7.3.3",
"version": "7.3.4",
"description": "AdonisJS addon for Redis",
"main": "build/providers/RedisProvider.js",
"exports": {
1 change: 1 addition & 0 deletions src/ioMethods.ts
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ export const ioMethods = [
'hget',
'hgetBuffer',
'hmget',
'hmset',
'hincrby',
'hincrbyfloat',
'hdel',
28 changes: 28 additions & 0 deletions test/redis.spec.ts
Original file line number Diff line number Diff line change
@@ -308,4 +308,32 @@ test.group('Redis Manager', () => {

await redis.quit('primary')
})

test('hmset and hmget', async ({ assert }) => {
const app = new Application(__dirname, 'web', {})
const redis = new RedisManager(
app,
{
connection: 'primary',
connections: {
primary: {
host: process.env.REDIS_HOST,
port: Number(process.env.REDIS_PORT),
},
cluster: {
clusters: clusterNodes,
},
},
},
new Emitter(app)
) as unknown as RedisManagerContract

await redis.hmset('greeting', { hello: 'world' })
const greeting = await redis.hmget('greeting', 'hello')

assert.equal(greeting, 'world')

await redis.del('greeting')
await redis.quit('primary')
})
})