Commit Graph

8 Commits

Author SHA1 Message Date
web3-developer 6b7de5730b
Implement missing getter and setters for option types. (#62)
* Update readme.

* Add additional opts getters and setters for ReadOptionsRef and WriteOptionsRef. Updated BackupEngineOptionsRef to use newer c library type.

* Add majority of option type getter and setters.
2024-07-03 23:46:42 +08:00
web3-developer 01ced36404
Fix segfault in filterpolicy close (#60)
* Fix seq fault caused by double free. Now using API correctly.

* Add tests to cover autoClose.
2024-07-02 12:44:05 +08:00
web3-developer 03313d8068
Auto close feature to improve memory management of option types. (#57)
* Revert some changes from prior PR https://github.com/status-im/nim-rocksdb/pull/48 which enable memory leak of options when not cleaned up manually.

* Clean up, add more tests and use correct free function for listColumnFamilies.

* Close opt types when opening database fails.

* Add autoClose flag to each opt type.

* Finish autoClose changes to prevent memory leaks.
2024-06-28 10:04:37 +08:00
web3-developer a691d5b9d2
Format using nph (#54)
* Format entire project using nph.

* Add nph lint to CI.
2024-06-26 23:00:10 +08:00
Jacek Sieka d648b10e2c
options: reclassify (#51)
Several options were mistakenly classified as db options when in fact
they are column family options - the C interface does not make this
distinction and instead puts them all under one umbrella.

This PR updates options to use nim setter/getter properties allowing
both read and write of most options - lots of options are exposed both
for reading and writing, but hey, one could always add _even more_ of
them - there's certainly no lack!
2024-06-19 08:39:15 +02:00
web3-developer f37d7d486c
Don't set default compression as it forces us to require the compression library when linking or at runtime. Let RocksBb pick the best default. (#41) 2024-03-30 00:26:12 +08:00
web3-developer 90027f1875
Support for static linking RocksDb. (#40)
* Added rocksdb as a submodule in vendor directory.

* Add support for static linking using nimble.

* Add script to build static library dependencies.

* Disable warnings as error in deps build.

* Set recommended compression options in build and in library.

* Move static linking into wrapper code.

* Conditionally set linker using when defined(macosx).

* Add support for linking windows static libraries.

* Build rocksdb static libs using vcpkg.

* Remove lib prefix from library names for windows.

* Static linking is not supported on windows. Update documentation and CI.
2024-03-27 14:18:21 +08:00
web3-developer 5f6282e8d4
Rocksdb rewrite integration (#38)
* Column families support (#34)

* Update library to support column families. If not specified, uses the 'default' column family.

* Added tests for column family changes.

* Update library version and readme.

* Updated the librocksdb c library to the latest stable version.

* Started rewrite of library.

* Commit library rewrite progress.

* Completed initial rewrite and refactored tests.

* Completed implementation of backup engine.

* Added tests for new types.

* Completed tests for existing features.

* Remove features not supported by older versions of RocksDB to fix CI (temporary fix).

* Remove flush before backup support from BackupEngine to fix CI.

* Transactions support (#36)

* Update library to support column families. If not specified, uses the 'default' column family.

* Added tests for column family changes.

* Update library version and readme.

* Updated the librocksdb c library to the latest stable version.

* Started rewrite of library.

* Commit library rewrite progress.

* Completed initial rewrite and refactored tests.

* Completed implementation of backup engine.

* Added tests for new types.

* Completed tests for existing features.

* Remove features not supported by older versions of RocksDB to fix CI (temporary fix).

* Remove flush before backup support from BackupEngine to fix CI.

* Implemented RocksDB iterator.

* Implemented pairs iterator.

* Completed implementation of WriteBatch with tests.

* Fix example code.

* Completed implementation of TransactionDb.

* Support setting default column family.

* Remove unneeded usage of var for ref type parameters.

* Completed transactiondb tests.

* Improve and refactor rocksdb test.

* Added support for ingesting sst files using the SstFileWriter. (#37)

* Create ColFamilyReadOnly and ColFamilyReadWrite types for using a specific column family.

* Use inline pragma for small procs and add lock to RocksDbRef type close to prevent double free.

* Added documentation for the public API.

* Initial implementation of sst filewriter.

* Added tests for sstfilewriter.

* Documentation minor improvements.
2024-03-05 11:12:37 +08:00