|
|
@ -941,7 +941,11 @@ impl Reader { |
|
|
|
)) |
|
|
|
)) |
|
|
|
} |
|
|
|
} |
|
|
|
InnerReader::Transaction(inner) => { |
|
|
|
InnerReader::Transaction(inner) => { |
|
|
|
if let Some(inner) = inner.upgrade() { |
|
|
|
let Some(inner) = inner.upgrade() else { |
|
|
|
|
|
|
|
return Err(StorageError::Other( |
|
|
|
|
|
|
|
"The transaction is already ended".into(), |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
}; |
|
|
|
ffi_result!(rocksdb_transaction_get_pinned_cf_with_status( |
|
|
|
ffi_result!(rocksdb_transaction_get_pinned_cf_with_status( |
|
|
|
*inner, |
|
|
|
*inner, |
|
|
|
self.options, |
|
|
|
self.options, |
|
|
@ -949,11 +953,6 @@ impl Reader { |
|
|
|
key.as_ptr().cast(), |
|
|
|
key.as_ptr().cast(), |
|
|
|
key.len() |
|
|
|
key.len() |
|
|
|
)) |
|
|
|
)) |
|
|
|
} else { |
|
|
|
|
|
|
|
return Err(StorageError::Other( |
|
|
|
|
|
|
|
"The transaction is already ended".into(), |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
InnerReader::PlainDb(inner) => { |
|
|
|
InnerReader::PlainDb(inner) => { |
|
|
|
ffi_result!(rocksdb_get_pinned_cf_with_status( |
|
|
|
ffi_result!(rocksdb_get_pinned_cf_with_status( |
|
|
@ -1022,13 +1021,12 @@ impl Reader { |
|
|
|
rocksdb_transactiondb_create_iterator_cf(inner.db.db, options, column_family.0) |
|
|
|
rocksdb_transactiondb_create_iterator_cf(inner.db.db, options, column_family.0) |
|
|
|
} |
|
|
|
} |
|
|
|
InnerReader::Transaction(inner) => { |
|
|
|
InnerReader::Transaction(inner) => { |
|
|
|
if let Some(inner) = inner.upgrade() { |
|
|
|
let Some(inner) = inner.upgrade() else { |
|
|
|
rocksdb_transaction_create_iterator_cf(*inner, options, column_family.0) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return Err(StorageError::Other( |
|
|
|
return Err(StorageError::Other( |
|
|
|
"The transaction is already ended".into(), |
|
|
|
"The transaction is already ended".into(), |
|
|
|
)); |
|
|
|
)); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
rocksdb_transaction_create_iterator_cf(*inner, options, column_family.0) |
|
|
|
} |
|
|
|
} |
|
|
|
InnerReader::PlainDb(inner) => { |
|
|
|
InnerReader::PlainDb(inner) => { |
|
|
|
rocksdb_create_iterator_cf(inner.db, options, column_family.0) |
|
|
|
rocksdb_create_iterator_cf(inner.db, options, column_family.0) |
|
|
|