Skip to content

DB Access: redis like key pattern matcher#70

Merged
anand-kumar-subramanian merged 2 commits intosonic-net:masterfrom
sachinholla:key_pattern
May 9, 2023
Merged

DB Access: redis like key pattern matcher#70
anand-kumar-subramanian merged 2 commits intosonic-net:masterfrom
sachinholla:key_pattern

Conversation

@sachinholla
Copy link
Contributor

Added following new methods to the db.Key struct:

  • IsPattern() : check if key contains any wildcard pattern
  • Matches(pattern Key) : check if key matches a given key pattern
  • Equals(other Key) : check if key is same another key

Added following new methods to the db.Key struct:
- IsPattern()           : check if key contains any wildcard pattern
- Matches(pattern Key)  : check if key matches a given key pattern
- Equals(other Key)     : check if key is same another key

Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
@sachinholla
Copy link
Contributor Author

Required for the subscription enhancements as described in HLD sonic-net/SONiC#1287

Copy link

@tomek-US tomek-US left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@anand-kumar-subramanian anand-kumar-subramanian merged commit 160001d into sonic-net:master May 9, 2023
@sachinholla sachinholla deleted the key_pattern branch June 18, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants