curiosity-ai / rocksdb-sharp

.net bindings for the rocksdb by facebook
BSD 2-Clause "Simplified" License
155 stars 38 forks source link

feat: Made ColumnFamilyOptions and DbOptions interchangeable. #30

Closed queequac closed 1 year ago

queequac commented 1 year ago

As mentioned in #27 options for InfoLogLevel have been implemented in ColumnFamilyOptions, even though they need to be in DbOptions.

Since both (DbOptions, ColumnFamilyOptions) are implemented in the native library interchangeable anyway, I simply made two abstract partial classes out of them. All methods accept and return the new class. Additionally I created empty stubs for DbOptions and ColumnFamilyOptions for compatibility with existing code. But since the return types are same for all methods now, you can use all of them across DbOptions and ColumnFamilyOptions.