You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
* fix #1906 - implement BITFIELD_RO * set bitfield_ro min version to 6.2
This commit is contained in:
26
packages/client/lib/commands/BITFIELD_RO.ts
Normal file
26
packages/client/lib/commands/BITFIELD_RO.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { BitFieldGetOperation } from './BITFIELD';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
export const IS_READ_ONLY = true;
|
||||
|
||||
type BitFieldRoOperations = Array<
|
||||
Omit<BitFieldGetOperation, 'operation'> &
|
||||
Partial<Pick<BitFieldGetOperation, 'operation'>>
|
||||
>;
|
||||
|
||||
export function transformArguments(key: string, operations: BitFieldRoOperations): Array<string> {
|
||||
const args = ['BITFIELD_RO', key];
|
||||
|
||||
for (const operation of operations) {
|
||||
args.push(
|
||||
'GET',
|
||||
operation.encoding,
|
||||
operation.offset.toString()
|
||||
);
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
export declare function transformReply(): Array<number | null>;
|
Reference in New Issue
Block a user