-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add sorted-set examples #241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
examples/composer.json
Outdated
@@ -1,6 +1,7 @@ | |||
{ | |||
"require": { | |||
"momentohq/client-sdk-php": "1.11.1", | |||
"momentohq/client-sdk-php": "dev-main", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎗️ to revert this change once the new SDK is released
24068ad
to
0ad6e75
Compare
|
||
// fetch sorted set by rank (0 to -1 for all elements) in ascending order | ||
$logger->info("Fetching sorted set $SET_NAME\n"); | ||
$response = $client->sortedSetFetchByRank($CACHE_NAME, $SET_NAME, 0, -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not leave off the ranks for fetching all elements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking into that. It was giving me error saying:
[ex:]: Error fetching sorted set: Invalid argument passed to Momento client: minScore must be less than or equal to maxScore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should show fetching in descending order using a named argument if possible, LGTM overall. We should get this in.
PR Description:
main
branch ofclient-sdk-php
repo since we currently do not have a released sdk version that contains the sorted-set apisIssue
#213
https://github.com/momentohq/dev-eco-issue-tracker/issues/1033