EchoVault / SugarDB

Embeddable and distributed in-memory alternative to Redis.
https://sugardb.io
Apache License 2.0
422 stars 25 forks source link

Implement KEYS command #56

Open kelvinmwinuka opened 5 months ago

kelvinmwinuka commented 5 months ago

Implement the KEYS command, which returns all the keys that match the provided pattern. Reference: https://redis.io/docs/latest/commands/keys/

Client-Server Spec:

Command File: ./internal/modules/generic/commands.go Test File: ./internal/modules/generic/commands_test.go

Command: keys Module: constants.GenericModule Categories: constants.KeyspaceCategory, constants.ReadCategory, constants.SlowCategory, constants.DangerousCategory Description: (KEYS pattern) Returns an array of keys that match the provided glob pattern. Sync: false

Embedded Spec:

Command File: ./echovault/api_generic.go Test File: ./echovault/api_generic_test.go

NOTE: You may have to edit the HandlerFuncParams type to include a function that returns all matching keys.

tristin-codes commented 5 months ago

I have started implementing this here: https://github.com/tristin-codes/EchoVault/commit/94a946ed2f3912262471ca5406827322b47b02c4