-
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.
Add all commands to new parser syntax for basic/graph/json
- Loading branch information
Showing
733 changed files
with
4,023 additions
and
2,564 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
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,16 +1,15 @@ | ||
import { RedisArgument, ArrayReply, BlobStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments(categoryName?: RedisArgument) { | ||
const args: Array<RedisArgument> = ['ACL', 'CAT']; | ||
|
||
parseCommand(parser: CommandParser, categoryName?: RedisArgument) { | ||
parser.pushVariadic(['ACL', 'CAT']); | ||
if (categoryName) { | ||
args.push(categoryName); | ||
parser.push(categoryName); | ||
} | ||
|
||
return args; | ||
}, | ||
transformArguments(categoryName?: RedisArgument) { return [] }, | ||
transformReply: undefined as unknown as () => ArrayReply<BlobStringReply> | ||
} 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 { NumberReply, Command } from '../RESP/types'; | ||
import { RedisVariadicArgument, pushVariadicArguments } from './generic-transformers'; | ||
import { CommandParser } from '../client/parser'; | ||
import { RedisVariadicArgument } from './generic-transformers'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments(username: RedisVariadicArgument) { | ||
return pushVariadicArguments(['ACL', 'DELUSER'], username); | ||
parseCommand(parser: CommandParser, username: RedisVariadicArgument) { | ||
parser.pushVariadic(['ACL', 'DELUSER']); | ||
parser.pushVariadic(username); | ||
}, | ||
transformArguments(username: RedisVariadicArgument) { return []; }, | ||
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,16 +1,13 @@ | ||
import { RedisArgument, SimpleStringReply, BlobStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments(username: RedisArgument, command: Array<RedisArgument>) { | ||
return [ | ||
'ACL', | ||
'DRYRUN', | ||
username, | ||
...command | ||
]; | ||
parseCommand(parser: CommandParser, username: RedisArgument, command: Array<RedisArgument>) { | ||
parser.pushVariadic(['ACL', 'DRYRUN', username, ...command]); | ||
}, | ||
transformArguments(username: RedisArgument, command: Array<RedisArgument>) { return [] }, | ||
transformReply: undefined as unknown as () => SimpleStringReply<'OK'> | BlobStringReply | ||
} 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,17 +1,16 @@ | ||
import { BlobStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments(bits?: number) { | ||
const args = ['ACL', 'GENPASS']; | ||
|
||
parseCommand(parser: CommandParser, bits?: number) { | ||
parser.pushVariadic(['ACL', 'GENPASS']); | ||
if (bits) { | ||
args.push(bits.toString()); | ||
parser.push(bits.toString()); | ||
} | ||
|
||
return args; | ||
}, | ||
transformArguments(bits?: number) { return [] }, | ||
transformReply: undefined as unknown as () => BlobStringReply | ||
} 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { ArrayReply, BlobStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments() { | ||
return ['ACL', 'LIST']; | ||
parseCommand(parser: CommandParser) { | ||
parser.pushVariadic(['ACL', 'LIST']); | ||
}, | ||
transformArguments() { return [] }, | ||
transformReply: undefined as unknown as () => ArrayReply<BlobStringReply> | ||
} 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 { SimpleStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: true, | ||
transformArguments() { | ||
return ['ACL', 'LOAD']; | ||
parseCommand(parser: CommandParser) { | ||
parser.pushVariadic(['ACL', 'LOAD']); | ||
}, | ||
transformArguments() { return [] }, | ||
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
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,13 @@ | ||
import { SimpleStringReply, Command } from '../RESP/types'; | ||
import { CommandParser } from '../client/parser'; | ||
import ACL_LOG from './ACL_LOG'; | ||
|
||
export default { | ||
FIRST_KEY_INDEX: undefined, | ||
IS_READ_ONLY: ACL_LOG.IS_READ_ONLY, | ||
transformArguments() { | ||
return ['ACL', 'LOG', 'RESET']; | ||
parseCommand(parser: CommandParser) { | ||
parser.pushVariadic(['ACL', 'LOG', 'RESET']); | ||
}, | ||
transformArguments() { return [] }, | ||
transformReply: undefined as unknown as () => SimpleStringReply<'OK'> | ||
} as const satisfies Command; |
Oops, something went wrong.