Skip to content
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

Inconsistent Redis Scripting API #3010

Closed
ghoshbishakh opened this issue Oct 3, 2024 · 1 comment
Closed

Inconsistent Redis Scripting API #3010

ghoshbishakh opened this issue Oct 3, 2024 · 1 comment
Assignees
Labels
type: enhancement A general enhancement

Comments

@ghoshbishakh
Copy link

The following example does not work:

https://github.com/spring-projects/spring-data-redis/blob/main/src/main/antora/modules/ROOT/pages/redis/scripting.adoc?plain=1#L55

Correct code will be:

public class Example {

  @Autowired
  ReactiveRedisOperations<String, String> redisOperations;

  @Autowired
  RedisScript<Boolean> script;

  public Flux<Boolean> checkAndSet(String expectedValue, String newValue) {
    return redisOperations.execute(script, singletonList("key"), expectedValue, newValue);
  }
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 3, 2024
@mp911de mp911de added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 8, 2024
@mp911de mp911de self-assigned this Oct 8, 2024
@mp911de mp911de changed the title Bug in Scripting example for Spring Data Redis Inconsistent Redis Scripting API Oct 10, 2024
@mp911de mp911de added type: enhancement A general enhancement and removed type: documentation A documentation update labels Oct 10, 2024
@mp911de mp911de added this to the 3.2.11 (2023.1.11) milestone Oct 10, 2024
mp911de added a commit that referenced this issue Oct 10, 2024
Consistently use literal null.

See #3010
mp911de added a commit that referenced this issue Oct 10, 2024
Consistently use literal null.

See #3010
mp911de added a commit that referenced this issue Oct 10, 2024
Consistently use literal null.

See #3010
@mp911de
Copy link
Member

mp911de commented Oct 10, 2024

Thanks for bringing this to our attention. We've updated documentation for 3.2 and 3.3 development lines. For 3.4, we introduced an overload accepting varargs in the reactive flow allowing a simpler invocation scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants