-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move as much of module ocmmands as I can to parser - depends on v5 un…
…blocking to move forward
- Loading branch information
Showing
233 changed files
with
1,040 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types'; | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { transformBooleanReply } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: false, | ||
transformArguments(key: RedisArgument, item: RedisArgument) { | ||
return ['BF.ADD', key, item]; | ||
parseCommand(parser: CommandParser, key: RedisArgument, item: RedisArgument) { | ||
parser.push('BF.ADD'); | ||
parser.pushKey(key); | ||
parser.push(item); | ||
}, | ||
transformReply: transformBooleanReply | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: true, | ||
transformArguments(key: RedisArgument) { | ||
return ['BF.CARD', key]; | ||
parseCommand(parser: CommandParser, key: RedisArgument) { | ||
parser.push('BF.CARD'); | ||
parser.pushKey(key); | ||
}, | ||
transformReply: undefined as unknown as () => NumberReply | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types'; | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { transformBooleanReply } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: true, | ||
transformArguments(key: RedisArgument, item: RedisArgument) { | ||
return ['BF.EXISTS', key, item]; | ||
parseCommand(parser: CommandParser, key: RedisArgument, item: RedisArgument) { | ||
parser.push('BF.EXISTS'); | ||
parser.pushKey(key); | ||
parser.push(item); | ||
}, | ||
transformReply: transformBooleanReply | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: false, | ||
transformArguments(key: RedisArgument, iterator: number, chunk: RedisArgument) { | ||
return ['BF.LOADCHUNK', key, iterator.toString(), chunk]; | ||
parseCommand(parser: CommandParser, key: RedisArgument, iterator: number, chunk: RedisArgument) { | ||
parser.push('BF.LOADCHUNK'); | ||
parser.pushKey(key); | ||
parser.push(iterator.toString(), chunk); | ||
}, | ||
transformReply: undefined as unknown as () => SimpleStringReply<'OK'> | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types'; | ||
import { RedisVariadicArgument, pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
import { transformBooleanArrayReply } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: false, | ||
transformArguments(key: RedisArgument, items: RedisVariadicArgument) { | ||
return pushVariadicArguments(['BF.MADD', key], items); | ||
parseCommand(parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument) { | ||
parser.push('BF.MADD'); | ||
parser.pushKey(key); | ||
parser.pushVariadic(items); | ||
}, | ||
transformReply: transformBooleanArrayReply | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types'; | ||
import { RedisVariadicArgument, pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
import { CommandParser } from '@redis/client/dist/lib/client/parser'; | ||
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
import { transformBooleanArrayReply } from '@redis/client/dist/lib/commands/generic-transformers'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: 1, | ||
IS_READ_ONLY: true, | ||
transformArguments(key: RedisArgument, items: RedisVariadicArgument) { | ||
return pushVariadicArguments(['BF.MEXISTS', key], items); | ||
parseCommand(parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument) { | ||
parser.push('BF.MEXISTS'); | ||
parser.pushKey(key); | ||
parser.pushVariadic(items); | ||
}, | ||
transformReply: transformBooleanArrayReply | ||
} as const satisfies Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.