-
Notifications
You must be signed in to change notification settings - Fork 0
Add Set support #46
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
Add Set support #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
No description provided.