MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / new

Method new

graphlite/src/txn/state.rs:23–29  ·  view source on GitHub ↗

Generate a new unique transaction ID based on system time

()

Source from the content-addressed store, hash-verified

21impl TransactionId {
22 /// Generate a new unique transaction ID based on system time
23 pub fn new() -> Self {
24 let timestamp = SystemTime::now()
25 .duration_since(UNIX_EPOCH)
26 .unwrap()
27 .as_nanos() as u64;
28 TransactionId(timestamp)
29 }
30
31 /// Get the underlying ID value
32 pub fn id(&self) -> u64 {

Callers

nothing calls this directly

Calls 2

TransactionIdClass · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected