Repository navigation
feat: complete Valkey & Redis JSON module support (v0.2.0) - #24
Merged
Merged
Conversation
…overage, Dart 3.13 generics and ergonomic defaults
…GELOG and bump version to 0.2.0
…s and improve error handling
…ch APIs - Implement JSON.MSET with JsonMSetCommand, JsonMSetEntry, client.jsonMSet, and ValkeyJsonStore.saveMany - Implement JSON.DEBUG with MEMORY, DEPTH, FIELDS, and HELP subcommands - Enhance HGETALL, PUBSUB NUMSUB, and PUBSUB SHARDNUMSUB to handle both Map and List responses - Update COMMANDS.md, CHANGELOG.md, and README.md with comprehensive documentation and examples - Achieve 100% test coverage across all 27 JSON module files
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
===========================================
+ Coverage 84.55% 97.55% +13.00%
===========================================
Files 260 162 -98
Lines 6143 2620 -3523
===========================================
- Hits 5194 2556 -2638
+ Misses 949 64 -885 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…commands - Add --report-on=lib in GitHub Actions CI LCOV generation - Add codecov.yml to ignore test and example files - Add unit test coverage for jsonStreamArray and jsonStrAppendRaw path parameter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements complete, robust, and type-safe support for the Valkey and Redis JSON module in
dart_valkey(v0.2.0), achieving 100% test coverage across all JSON commands and high-level ergonomic APIs.🌟 What's New
Complete 23 JSON Commands:
JSON.SET,JSON.GET,JSON.DEL,JSON.FORGET,JSON.MGET,JSON.MSETJSON.DEBUG(with all 4 subcommands:MEMORY,DEPTH,FIELDS,HELP)JSON.TYPE,JSON.NUMINCRBY,JSON.NUMMULTBY,JSON.TOGGLEJSON.STRAPPEND,JSON.STRLENJSON.ARRAPPEND,JSON.ARRINSERT,JSON.ARRLEN,JSON.ARRPOP,JSON.ARRINDEX,JSON.ARRTRIMJSON.OBJKEYS,JSON.OBJLEN,JSON.MERGE,JSON.CLEAR,JSON.RESPHigh-Level Ergonomic APIs:
ValkeyJsonStore<T>: Strongly-typed repository pattern for managing JSON documents with automatic key generation, TTL handling, atomic batch saving (saveMany), and sub-field mutations.JsonPathBuilder: Immutable, type-safe JSONPath DSL supporting nested fields, array indices, wildcards, slicing, and filter expressions (JsonPath.root['store']['items'][0]).JsonUpdateBuilder(client.jsonUpdate): Fluent batch document updater for applying multiple atomic mutations in a single cascade.jsonStreamArray<T>: Paginated chunked streaming for processing massive JSON arrays without loading them entirely into memory.fromJsonfactories, and pluggable serialization libraries.Core Fixes & Enhancements:
keyPrefixconstructor evaluation when null.RespException) to immediately reject pending futures.HGETALL,PUBSUB NUMSUB, andPUBSUB SHARDNUMSUBto support both native RESP2 (List) and RESP3 (Map) replies.🧪 Verification
lib/src/commands/json/.dart analyze).dart pub publish --dry-runpassed.