mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Add missing stream key prefixes (#1230)
* Added missing stream key prefixes * Tested stream command key prefixing
This commit is contained in:
@@ -181,9 +181,11 @@ class KeyPrefixProcessor implements ProcessorInterface
|
||||
/* ---------------- Redis 5.0 ---------------- */
|
||||
'XADD' => $prefixFirst,
|
||||
'XRANGE' => $prefixFirst,
|
||||
'XREVRANGE' => $prefixFirst,
|
||||
'XDEL' => $prefixFirst,
|
||||
'XLEN' => $prefixFirst,
|
||||
'XACK' => $prefixFirst,
|
||||
'XTRIM' => $prefixFirst,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -944,6 +944,35 @@ class KeyPrefixProcessorTest extends PredisTestCase
|
||||
['key', 'member', '100', 'km', 'WITHDIST', 'STORE', 'key:store', 'STOREDIST', 'key:storedist'],
|
||||
['prefix:key', 'member', '100', 'km', 'WITHDIST', 'STORE', 'prefix:key:store', 'STOREDIST', 'prefix:key:storedist'],
|
||||
],
|
||||
/* ---------------- Redis 5.0 ---------------- */
|
||||
['XADD',
|
||||
['key', '*', ['field' => 'value']],
|
||||
['prefix:key', '*', ['field' => 'value']],
|
||||
],
|
||||
['XRANGE',
|
||||
['key', '-', '+'],
|
||||
['prefix:key', '-', '+'],
|
||||
],
|
||||
['XREVRANGE',
|
||||
['key', '+', '-'],
|
||||
['prefix:key', '+', '-'],
|
||||
],
|
||||
['XDEL',
|
||||
['key', 'id'],
|
||||
['prefix:key', 'id'],
|
||||
],
|
||||
['XLEN',
|
||||
['key'],
|
||||
['prefix:key'],
|
||||
],
|
||||
['XACK',
|
||||
['key', 'group', 'id'],
|
||||
['prefix:key', 'group', 'id'],
|
||||
],
|
||||
['XTRIM',
|
||||
['key', 'MAXLEN', 100],
|
||||
['prefix:key', 'MAXLEN', 100],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user