Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for ISet<T> collections to the RocksDb.Extensions library, mirroring the existing IList<T> functionality. The implementation refactors the existing list serializers by introducing base classes that can be shared between list and set serializers.
Key Changes:
- Introduced abstract base classes
FixedSizeCollectionSerializerandVariableSizeCollectionSerializerfor code reuse - Created
FixedSizeSetSerializerandVariableSizeSetSerializerfor set-specific implementations - Refactored existing list serializers to inherit from the new base classes
- Updated
RocksDbBuilderto automatically create appropriate serializers forISet<T>types - Added comprehensive test coverage for set support across all serializer types
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/RocksDb.Extensions/FixedSizeCollectionSerializer.cs | New abstract base class for serializing collections with fixed-size elements (primitives) |
| src/RocksDb.Extensions/VariableSizeCollectionSerializer.cs | New abstract base class for serializing collections with variable-size elements (strings, complex objects) |
| src/RocksDb.Extensions/FixedSizeSetSerializer.cs | Concrete implementation for serializing ISet with fixed-size elements |
| src/RocksDb.Extensions/VariableSizeSetSerializer.cs | Concrete implementation for serializing ISet with variable-size elements |
| src/RocksDb.Extensions/FixedSizeListSerializer.cs | Refactored to extend FixedSizeCollectionSerializer base class |
| src/RocksDb.Extensions/VariableSizeListSerializer.cs | Refactored to extend VariableSizeCollectionSerializer base class |
| src/RocksDb.Extensions/RocksDbBuilder.cs | Added logic to detect ISet types and create appropriate serializers (fixed vs variable size) |
| test/RocksDb.Extensions.Tests/RocksDbStoreWithProtobufSerializerTests.cs | Added test for set support with Protobuf serializer |
| test/RocksDb.Extensions.Tests/RocksDbStoreWithProtoBufNetSerializerTests.cs | Added test for set support with ProtoBufNet serializer |
| test/RocksDb.Extensions.Tests/RocksDbStoreWithPrimitiveSerializerTests.cs | Added tests for set support with primitive types (int and string) |
| test/RocksDb.Extensions.Tests/RocksDbStoreWithJsonSerializerTests.cs | Added test for set support with JSON serializer |
| README.md | Updated documentation to reflect ISet support alongside IList |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/RocksDb.Extensions.Tests/RocksDbStoreWithProtobufSerializerTests.cs
Show resolved
Hide resolved
test/RocksDb.Extensions.Tests/RocksDbStoreWithProtoBufNetSerializerTests.cs
Show resolved
Hide resolved
test/RocksDb.Extensions.Tests/RocksDbStoreWithPrimitiveSerializerTests.cs
Show resolved
Hide resolved
aa8cab6 to
a8955e0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.