-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refactor script content argument types to String and byte[] instead of V (value type) #1010
Comments
Thanks for the report. I have been always torn on this one since a script isn't exactly a The issue with When representing the script as |
Thanks for the quick response! While I agree the script can be encoded in various ways, forcing it to the value type It may make more sense to make this type a generic for a given set of encodings. I'm happy to take a stab at the implementation. Additionally (and let me know if I should open a separate issue), I'm not sure using |
We could consider using We can apply such a change with a major release only to not break existing application code and so this ticket could be a candidate for Lettuce 6. Feel free to open a new ticket for the second issue to not mix topics. |
Sounds great, thanks! |
…f V (value type) #1010 Scripting commands come now with two overloads that accept scripts in their String and binary representation. Previously, Lettuce accepted a mixed set of types, predominantly Strings which were converted using platform-default encoding. The script encoding is configurable via ClientOptions.
Bug Report
Script load should take in a String, not an argument of type
T
.Current Behavior
For the sync, async, and reactive apis command interfaces, the
scriptLoad
method takes in a script of typeV
, instead of a string. As redis can only eval with a lua script that is of typeString
, it does not make sense to use a generic.Input Code
https://github.com/lettuce-io/lettuce-core/blob/c98108dd7fbe9bee8702e468efff4b085a976374/src/main/java/io/lettuce/core/api/sync/RedisScriptingCommands.java#L109
should be changed to
String scriptLoad(String script);
The text was updated successfully, but these errors were encountered: