MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / record_open

Function record_open

atomic-core/src/pristine/build_metadata.rs:17–24  ·  view source on GitHub ↗
(txn: &WriteTransaction, is_new: bool)

Source from the content-addressed store, hash-verified

15pub const BUILD_VERSION: &str = env!("ATOMIC_BUILD_VERSION");
16
17pub(crate) fn record_open(txn: &WriteTransaction, is_new: bool) -> PristineResult<()> {
18 let mut meta = txn.open_table(ATOMIC_META)?;
19 if is_new && meta.get(CREATED_WITH_KEY)?.is_none() {
20 meta.insert(CREATED_WITH_KEY, BUILD_VERSION.as_bytes())?;
21 }
22 meta.insert(LAST_WRITABLE_OPEN_WITH_KEY, BUILD_VERSION.as_bytes())?;
23 Ok(())
24}
25
26/// Record a completed migration in the same transaction as its schema changes.
27pub fn record_migration(txn: &WriteTransaction) -> PristineResult<()> {

Callers 1

openMethod · 0.85

Calls 4

is_noneMethod · 0.80
getMethod · 0.65
insertMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected