Draft API for connection and template layers for Redis JSON commands#3327
Draft API for connection and template layers for Redis JSON commands#3327Dgramada wants to merge 4 commits intospring-projects:mainfrom
Conversation
…perations. Furthermore, added a JsonPath class for easier path creating for JSON methods in the template layer. These are draft classes and their purpose is to get feedback and an initial feeling of how the JSON API should look like. Signed-off-by: Yordan Tsintsov <yordan.tsintsov@redis.com>
…implementations for some of the overloaded classes. Signed-off-by: Yordan Tsintsov <yordan.tsintsov@redis.com>
Signed-off-by: Yordan Tsintsov <yordan.tsintsov@redis.com>
| * @see <a href="https://redis.io/docs/latest/commands/json.arrindex/">Redis JSON.ARRINDEX</a> | ||
| */ | ||
| @NullMarked | ||
| public final class JsonArrayRange { |
There was a problem hiding this comment.
We do have a Spring Data Range object org.springframework.data.domain.Range<T>. I wonder if we could that instead?
There was a problem hiding this comment.
When you get into the impl PTAL at this Range and see if it something we would want to re-use.
src/main/java/org/springframework/data/redis/connection/RedisJsonCommands.java Outdated Show resolved Hide resolved
Signed-off-by: Yordan Tsintsov <yordan.tsintsov@redis.com>
| If the interfaces are acceptable, I could close this issue and create a separate one that introduces them alongside their implementations and testing. Would you prefer this approach or would you like me to extend this PR? |
| * @since 4.3 | ||
| */ | ||
| @NullMarked | ||
| public final class JsonPath { |
There was a problem hiding this comment.
@mp911de what are your thoughts on using a record here instead? The eq/hc/ts cruft goes away.
I would just rock this PR (continue on from this point). Thank you for the quick turnaround - I was on PTO - sorry for the delay. |
Provides a draft version of how the JSON template and connection layer API should look like. The purpose of this PR is to receive feedback and to get a better feeling of what should Spring Data Redis provide for users that would like to use Redis JSON.