From 39bd787627d5dba4d83acf0b0b0eae44abf63165 Mon Sep 17 00:00:00 2001 From: zaidoon Date: Sat, 10 Feb 2024 11:36:41 -0500 Subject: [PATCH] more fixes after renaming package --- src/backup.rs | 4 +- src/db_iterator.rs | 12 +- src/db_options.rs | 142 +++++++++--------- src/ffi_util.rs | 2 +- src/lib.rs | 4 +- src/merge_operator.rs | 2 +- src/snapshot.rs | 2 +- src/transactions/optimistic_transaction_db.rs | 2 +- src/transactions/transaction_db.rs | 2 +- src/write_batch.rs | 2 +- tests/fail/checkpoint_outlive_db.rs | 2 +- tests/fail/iterator_outlive_db.rs | 2 +- ...n_with_multiple_refs_as_single_threaded.rs | 2 +- tests/fail/snapshot_outlive_db.rs | 2 +- tests/fail/snapshot_outlive_transaction.rs | 4 +- tests/fail/snapshot_outlive_transaction_db.rs | 4 +- .../transaction_outlive_transaction_db.rs | 4 +- 17 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/backup.rs b/src/backup.rs index 17d0796..62b6c82 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -120,10 +120,10 @@ impl BackupEngine { /// # Examples /// /// ```ignore - /// use rocksdb::backup::{BackupEngine, BackupEngineOptions}; + /// use rust_rocksdb::backup::{BackupEngine, BackupEngineOptions}; /// let backup_opts = BackupEngineOptions::default(); /// let mut backup_engine = BackupEngine::open(&backup_opts, &backup_path).unwrap(); - /// let mut restore_option = rocksdb::backup::RestoreOptions::default(); + /// let mut restore_option = rust_rocksdb::backup::RestoreOptions::default(); /// restore_option.set_keep_log_files(true); /// true to keep log files /// if let Err(e) = backup_engine.restore_from_latest_backup(&db_path, &wal_dir, &restore_option) { /// error!("Failed to restore from the backup. Error:{:?}", e); diff --git a/src/db_iterator.rs b/src/db_iterator.rs index 846cfcf..96a980e 100644 --- a/src/db_iterator.rs +++ b/src/db_iterator.rs @@ -31,7 +31,7 @@ pub type DBRawIterator<'a> = DBRawIteratorWithThreadMode<'a, DB>; /// widely recognised Rust idioms. /// /// ``` -/// use rocksdb::{DB, Options}; +/// use rust_rocksdb::{DB, Options}; /// /// let path = "_path_for_rocksdb_storage4"; /// { @@ -141,7 +141,7 @@ impl<'a, D: DBAccess> DBRawIteratorWithThreadMode<'a, D> { /// # Examples /// /// ```rust - /// use rocksdb::{DB, Options}; + /// use rust_rocksdb::{DB, Options}; /// /// let path = "_path_for_rocksdb_storage5"; /// { @@ -178,7 +178,7 @@ impl<'a, D: DBAccess> DBRawIteratorWithThreadMode<'a, D> { /// # Examples /// /// ```rust - /// use rocksdb::{DB, Options}; + /// use rust_rocksdb::{DB, Options}; /// /// let path = "_path_for_rocksdb_storage6"; /// { @@ -218,7 +218,7 @@ impl<'a, D: DBAccess> DBRawIteratorWithThreadMode<'a, D> { /// # Examples /// /// ```rust - /// use rocksdb::{DB, Options}; + /// use rust_rocksdb::{DB, Options}; /// /// let path = "_path_for_rocksdb_storage7"; /// { @@ -257,7 +257,7 @@ impl<'a, D: DBAccess> DBRawIteratorWithThreadMode<'a, D> { /// # Examples /// /// ```rust - /// use rocksdb::{DB, Options}; + /// use rust_rocksdb::{DB, Options}; /// /// let path = "_path_for_rocksdb_storage8"; /// { @@ -375,7 +375,7 @@ pub type DBIterator<'a> = DBIteratorWithThreadMode<'a, DB>; /// ranges and direction. /// /// ``` -/// use rocksdb::{DB, Direction, IteratorMode, Options}; +/// use rust_rocksdb::{DB, Direction, IteratorMode, Options}; /// /// let path = "_path_for_rocksdb_storage2"; /// { diff --git a/src/db_options.rs b/src/db_options.rs index dd3ecdd..ccadbe7 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -250,8 +250,8 @@ impl BlockBasedOptionsMustOutliveDB { /// # Examples /// /// ``` -/// use rocksdb::{Options, DB}; -/// use rocksdb::DBCompactionStyle; +/// use rust_rocksdb::{Options, DB}; +/// use rust_rocksdb::DBCompactionStyle; /// /// fn badly_tuned_for_somebody_elses_disk() -> DB { /// let path = "path/for/rocksdb/storageX"; @@ -286,7 +286,7 @@ pub struct Options { /// Making an unsafe write of a batch: /// /// ``` -/// use rocksdb::{DB, Options, WriteBatch, WriteOptions}; +/// use rust_rocksdb::{DB, Options, WriteBatch, WriteOptions}; /// /// let path = "_path_for_rocksdb_storageY1"; /// { @@ -315,7 +315,7 @@ pub struct WriteOptions { /// Manually flushing the memtable: /// /// ``` -/// use rocksdb::{DB, Options, FlushOptions}; +/// use rust_rocksdb::{DB, Options, FlushOptions}; /// /// let path = "_path_for_rocksdb_storageY2"; /// { @@ -356,7 +356,7 @@ pub struct CuckooTableOptions { /// Move files instead of copying them: /// /// ``` -/// use rocksdb::{DB, IngestExternalFileOptions, SstFileWriter, Options}; +/// use rust_rocksdb::{DB, IngestExternalFileOptions, SstFileWriter, Options}; /// /// let writer_opts = Options::default(); /// let mut writer = SstFileWriter::create(&writer_opts); @@ -531,7 +531,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::BlockBasedOptions; + /// use rust_rocksdb::BlockBasedOptions; /// /// let mut opts = BlockBasedOptions::default(); /// opts.set_bloom_filter(10.0, true); @@ -557,7 +557,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::BlockBasedOptions; + /// use rust_rocksdb::BlockBasedOptions; /// /// let mut opts = BlockBasedOptions::default(); /// opts.set_ribbon_filter(10.0); @@ -579,7 +579,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::BlockBasedOptions; + /// use rust_rocksdb::BlockBasedOptions; /// /// let mut opts = BlockBasedOptions::default(); /// opts.set_hybrid_ribbon_filter(10.0, 2); @@ -615,7 +615,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::{BlockBasedOptions, BlockBasedIndexType, Options}; + /// use rust_rocksdb::{BlockBasedOptions, BlockBasedIndexType, Options}; /// /// let mut opts = Options::default(); /// let mut block_opts = BlockBasedOptions::default(); @@ -707,7 +707,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::{BlockBasedOptions, DataBlockIndexType, Options}; + /// use rust_rocksdb::{BlockBasedOptions, DataBlockIndexType, Options}; /// /// let mut opts = Options::default(); /// let mut block_opts = BlockBasedOptions::default(); @@ -762,7 +762,7 @@ impl BlockBasedOptions { /// # Examples /// /// ``` - /// use rocksdb::BlockBasedOptions; + /// use rust_rocksdb::BlockBasedOptions; /// /// let mut opts = BlockBasedOptions::default(); /// opts.set_bloom_filter(10.0, true); @@ -951,7 +951,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.increase_parallelism(3); @@ -1019,7 +1019,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.create_if_missing(true); @@ -1041,7 +1041,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.create_missing_column_families(true); @@ -1136,7 +1136,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_compression_type(DBCompressionType::Snappy); @@ -1159,7 +1159,7 @@ impl Options { /// Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_compression_type(DBCompressionType::Zstd); @@ -1180,7 +1180,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_wal_compression_type(DBCompressionType::Zstd); @@ -1208,7 +1208,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_bottommost_compression_type(DBCompressionType::Zstd); @@ -1231,7 +1231,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_compression_per_level(&[ @@ -1273,7 +1273,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_compression_options(4, 5, 6, 7); @@ -1304,7 +1304,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompressionType}; + /// use rust_rocksdb::{Options, DBCompressionType}; /// /// let mut opts = Options::default(); /// opts.set_bottommost_compression_type(DBCompressionType::Zstd); @@ -1594,7 +1594,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_optimize_filters_for_hits(true); @@ -1643,7 +1643,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_max_open_files(10); @@ -1677,7 +1677,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_use_fsync(true); @@ -1711,7 +1711,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, LogLevel}; + /// use rust_rocksdb::{Options, LogLevel}; /// /// let mut opts = Options::default(); /// opts.set_log_level(LogLevel::Warn); @@ -1739,7 +1739,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_bytes_per_sync(1024 * 1024); @@ -1789,7 +1789,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_allow_concurrent_memtable_write(false); @@ -1843,7 +1843,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_use_direct_reads(true); @@ -1867,7 +1867,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_use_direct_io_for_flush_and_compaction(true); @@ -1912,7 +1912,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// #[allow(deprecated)] @@ -1934,7 +1934,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_table_cache_num_shard_bits(4); @@ -1968,7 +1968,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_min_write_buffer_number(2); @@ -1992,7 +1992,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_max_write_buffer_number(4); @@ -2023,7 +2023,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_write_buffer_size(128 * 1024 * 1024); @@ -2048,7 +2048,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_db_write_buffer_size(128 * 1024 * 1024); @@ -2075,7 +2075,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_max_bytes_for_level_base(512 * 1024 * 1024); @@ -2091,7 +2091,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_max_bytes_for_level_multiplier(4.0); @@ -2109,7 +2109,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_max_manifest_file_size(20 * 1024 * 1024); @@ -2136,7 +2136,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_target_file_size_base(128 * 1024 * 1024); @@ -2160,7 +2160,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_min_write_buffer_number_to_merge(2); @@ -2181,7 +2181,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_level_zero_file_num_compaction_trigger(8); @@ -2203,7 +2203,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_level_zero_slowdown_writes_trigger(10); @@ -2223,7 +2223,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_level_zero_stop_writes_trigger(48); @@ -2241,7 +2241,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBCompactionStyle}; + /// use rust_rocksdb::{Options, DBCompactionStyle}; /// /// let mut opts = Options::default(); /// opts.set_compaction_style(DBCompactionStyle::Universal); @@ -2335,7 +2335,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// #[allow(deprecated)] @@ -2371,7 +2371,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// #[allow(deprecated)] @@ -2397,7 +2397,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_disable_auto_compactions(true); @@ -2577,7 +2577,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, MemtableFactory}; + /// use rust_rocksdb::{Options, MemtableFactory}; /// let mut opts = Options::default(); /// let factory = MemtableFactory::HashSkipList { /// bucket_count: 1_000_000, @@ -2626,7 +2626,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, CuckooTableOptions}; + /// use rust_rocksdb::{Options, CuckooTableOptions}; /// /// let mut opts = Options::default(); /// let mut factory_opts = CuckooTableOptions::default(); @@ -2655,7 +2655,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{KeyEncodingType, Options, PlainTableFactoryOptions}; + /// use rust_rocksdb::{KeyEncodingType, Options, PlainTableFactoryOptions}; /// /// let mut opts = Options::default(); /// let factory_opts = PlainTableFactoryOptions { @@ -2701,7 +2701,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_report_bg_io_stats(true); @@ -2721,7 +2721,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// // Set max total wal size to 1G. @@ -2740,7 +2740,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, DBRecoveryMode}; + /// use rust_rocksdb::{Options, DBRecoveryMode}; /// /// let mut opts = Options::default(); /// opts.set_wal_recovery_mode(DBRecoveryMode::AbsoluteConsistency); @@ -2778,7 +2778,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_stats_dump_period_sec(300); @@ -2796,7 +2796,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_stats_persist_period_sec(5); @@ -2858,7 +2858,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::{Options, SliceTransform}; + /// use rust_rocksdb::{Options, SliceTransform}; /// /// let mut opts = Options::default(); /// let transform = SliceTransform::create_fixed_prefix(10); @@ -2892,7 +2892,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut opts = Options::default(); /// opts.set_wal_dir("/path/to/dir"); @@ -2967,7 +2967,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_keep_log_file_num(100); @@ -2985,7 +2985,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_allow_mmap_writes(true); @@ -3003,7 +3003,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_allow_mmap_reads(true); @@ -3023,7 +3023,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_manual_wal_flush(true); @@ -3046,7 +3046,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_atomic_flush(true); @@ -3077,7 +3077,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_ratelimiter(1024 * 1024, 100 * 1000, 10); @@ -3108,7 +3108,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_max_log_file_size(0); @@ -3143,7 +3143,7 @@ impl Options { /// # Examples /// /// ``` - /// use rocksdb::Options; + /// use rust_rocksdb::Options; /// /// let mut options = Options::default(); /// options.set_recycle_log_file_num(5); @@ -3382,7 +3382,7 @@ impl FlushOptions { /// # Examples /// /// ``` - /// use rocksdb::FlushOptions; + /// use rust_rocksdb::FlushOptions; /// /// let mut options = FlushOptions::default(); /// options.set_wait(false); @@ -3555,7 +3555,7 @@ impl ReadOptions { /// supported. For example: /// /// ``` - /// let mut options = rocksdb::ReadOptions::default(); + /// let mut options = rust_rocksdb::ReadOptions::default(); /// options.set_iterate_range("xy".as_bytes().."xz".as_bytes()); /// ``` /// @@ -3564,8 +3564,8 @@ impl ReadOptions { /// equivalent to: /// /// ``` - /// let mut options = rocksdb::ReadOptions::default(); - /// options.set_iterate_range(rocksdb::PrefixRange("xy".as_bytes())); + /// let mut options = rust_rocksdb::ReadOptions::default(); + /// options.set_iterate_range(rust_rocksdb::PrefixRange("xy".as_bytes())); /// ``` /// /// Note that setting range using this method is separate to using prefix @@ -3577,7 +3577,7 @@ impl ReadOptions { /// bounds can be reset by setting the range to `..` as in: /// /// ``` - /// let mut options = rocksdb::ReadOptions::default(); + /// let mut options = rust_rocksdb::ReadOptions::default(); /// options.set_iterate_range(..); /// ``` pub fn set_iterate_range(&mut self, range: impl crate::IterateBounds) { @@ -3703,7 +3703,7 @@ impl ReadOptions { /// Default: 0 /// /// ``` - /// use rocksdb::{ReadOptions}; + /// use rust_rocksdb::{ReadOptions}; /// /// let mut opts = ReadOptions::default(); /// opts.set_readahead_size(4_194_304); // 4mb diff --git a/src/ffi_util.rs b/src/ffi_util.rs index 555e3d4..a05b506 100644 --- a/src/ffi_util.rs +++ b/src/ffi_util.rs @@ -97,7 +97,7 @@ macro_rules! ffi_try_impl { /// /// ``` /// use std::ffi::{CStr, CString}; -/// use rocksdb::CStrLike; +/// use rust_rocksdb::CStrLike; /// /// fn strlen(arg: impl CStrLike) -> std::result::Result { /// let baked = arg.bake().map_err(|err| err.to_string())?; diff --git a/src/lib.rs b/src/lib.rs index 54907d6..b7b20a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! # Examples //! //! ``` -//! use rocksdb::{DB, Options}; +//! use rust_rocksdb::{DB, Options}; //! // NB: db is automatically closed at end of lifetime //! let path = "_path_for_rocksdb_storage"; //! { @@ -37,7 +37,7 @@ //! Opening a database and a single column family with custom options: //! //! ``` -//! use rocksdb::{DB, ColumnFamilyDescriptor, Options}; +//! use rust_rocksdb::{DB, ColumnFamilyDescriptor, Options}; //! //! let path = "_path_for_rocksdb_storage_with_cfs"; //! let mut cf_opts = Options::default(); diff --git a/src/merge_operator.rs b/src/merge_operator.rs index 22b0cb7..313a0f9 100644 --- a/src/merge_operator.rs +++ b/src/merge_operator.rs @@ -16,7 +16,7 @@ //! rustic merge operator //! //! ``` -//! use rocksdb::{Options, DB, MergeOperands}; +//! use rust_rocksdb::{Options, DB, MergeOperands}; //! //! fn concat_merge(new_key: &[u8], //! existing_val: Option<&[u8]>, diff --git a/src/snapshot.rs b/src/snapshot.rs index ac7fae3..801e262 100644 --- a/src/snapshot.rs +++ b/src/snapshot.rs @@ -25,7 +25,7 @@ pub type Snapshot<'a> = SnapshotWithThreadMode<'a, DB>; /// # Examples /// /// ``` -/// use rocksdb::{DB, IteratorMode, Options}; +/// use rust_rocksdb::{DB, IteratorMode, Options}; /// /// let path = "_path_for_rocksdb_storage3"; /// { diff --git a/src/transactions/optimistic_transaction_db.rs b/src/transactions/optimistic_transaction_db.rs index 27e494f..472a130 100644 --- a/src/transactions/optimistic_transaction_db.rs +++ b/src/transactions/optimistic_transaction_db.rs @@ -37,7 +37,7 @@ use crate::{ /// # Examples /// /// ``` -/// use rocksdb::{DB, Options, OptimisticTransactionDB, SingleThreaded}; +/// use rust_rocksdb::{DB, Options, OptimisticTransactionDB, SingleThreaded}; /// let path = "_path_for_optimistic_transaction_db"; /// { /// let db: OptimisticTransactionDB = OptimisticTransactionDB::open_default(path).unwrap(); diff --git a/src/transactions/transaction_db.rs b/src/transactions/transaction_db.rs index 1806674..1be4be6 100644 --- a/src/transactions/transaction_db.rs +++ b/src/transactions/transaction_db.rs @@ -52,7 +52,7 @@ type DefaultThreadMode = crate::MultiThreaded; /// if feature `multi-threaded-cf` is not enabled. /// /// ``` -/// use rocksdb::{DB, Options, TransactionDB, SingleThreaded}; +/// use rust_rocksdb::{DB, Options, TransactionDB, SingleThreaded}; /// let path = "_path_for_transaction_db"; /// { /// let db: TransactionDB = TransactionDB::open_default(path).unwrap(); diff --git a/src/write_batch.rs b/src/write_batch.rs index 2aff809..7cc7f7b 100644 --- a/src/write_batch.rs +++ b/src/write_batch.rs @@ -26,7 +26,7 @@ pub type WriteBatch = WriteBatchWithTransaction; /// Making an atomic commit of several writes: /// /// ``` -/// use rocksdb::{DB, Options, WriteBatchWithTransaction}; +/// use rust_rocksdb::{DB, Options, WriteBatchWithTransaction}; /// /// let path = "_path_for_rocksdb_storage1"; /// { diff --git a/tests/fail/checkpoint_outlive_db.rs b/tests/fail/checkpoint_outlive_db.rs index d8400e0..fe2b899 100644 --- a/tests/fail/checkpoint_outlive_db.rs +++ b/tests/fail/checkpoint_outlive_db.rs @@ -1,4 +1,4 @@ -use rocksdb::{DB, checkpoint::Checkpoint}; +use rust_rocksdb::{checkpoint::Checkpoint, DB}; fn main() { let _checkpoint = { diff --git a/tests/fail/iterator_outlive_db.rs b/tests/fail/iterator_outlive_db.rs index 49463f1..1f25082 100644 --- a/tests/fail/iterator_outlive_db.rs +++ b/tests/fail/iterator_outlive_db.rs @@ -1,4 +1,4 @@ -use rocksdb::{IteratorMode, DB}; +use rust_rocksdb::{IteratorMode, DB}; fn main() { let _iter = { diff --git a/tests/fail/open_with_multiple_refs_as_single_threaded.rs b/tests/fail/open_with_multiple_refs_as_single_threaded.rs index 8bf3524..9573b89 100644 --- a/tests/fail/open_with_multiple_refs_as_single_threaded.rs +++ b/tests/fail/open_with_multiple_refs_as_single_threaded.rs @@ -1,4 +1,4 @@ -use rocksdb::{SingleThreaded, DBWithThreadMode, Options}; +use rust_rocksdb::{DBWithThreadMode, Options, SingleThreaded}; fn main() { let db = DBWithThreadMode::::open_default("/path/to/dummy").unwrap(); diff --git a/tests/fail/snapshot_outlive_db.rs b/tests/fail/snapshot_outlive_db.rs index 09141d9..17c41aa 100644 --- a/tests/fail/snapshot_outlive_db.rs +++ b/tests/fail/snapshot_outlive_db.rs @@ -1,4 +1,4 @@ -use rocksdb::DB; +use rust_rocksdb::DB; fn main() { let _snapshot = { diff --git a/tests/fail/snapshot_outlive_transaction.rs b/tests/fail/snapshot_outlive_transaction.rs index 5ec2346..97aaca8 100644 --- a/tests/fail/snapshot_outlive_transaction.rs +++ b/tests/fail/snapshot_outlive_transaction.rs @@ -1,4 +1,4 @@ -use rocksdb::{TransactionDB, SingleThreaded}; +use rust_rocksdb::{SingleThreaded, TransactionDB}; fn main() { let db = TransactionDB::::open_default("foo").unwrap(); @@ -6,4 +6,4 @@ fn main() { let txn = db.transaction(); txn.snapshot() }; -} \ No newline at end of file +} diff --git a/tests/fail/snapshot_outlive_transaction_db.rs b/tests/fail/snapshot_outlive_transaction_db.rs index 8c3b949..b7f6ead 100644 --- a/tests/fail/snapshot_outlive_transaction_db.rs +++ b/tests/fail/snapshot_outlive_transaction_db.rs @@ -1,8 +1,8 @@ -use rocksdb::{TransactionDB, SingleThreaded}; +use rust_rocksdb::{SingleThreaded, TransactionDB}; fn main() { let _snapshot = { let db = TransactionDB::::open_default("foo").unwrap(); db.snapshot() }; -} \ No newline at end of file +} diff --git a/tests/fail/transaction_outlive_transaction_db.rs b/tests/fail/transaction_outlive_transaction_db.rs index 75d4339..b49ddbe 100644 --- a/tests/fail/transaction_outlive_transaction_db.rs +++ b/tests/fail/transaction_outlive_transaction_db.rs @@ -1,8 +1,8 @@ -use rocksdb::{TransactionDB, SingleThreaded}; +use rust_rocksdb::{SingleThreaded, TransactionDB}; fn main() { let _txn = { let db = TransactionDB::::open_default("foo").unwrap(); db.transaction() }; -} \ No newline at end of file +}