get

fun get(key: Key): Variant?

The current version of key, or null if it is absent or deleted.

The returned Variant is a view over the stored bytes and copies nothing; reading one field of a large document costs the field. When the document comes from a segment, that view is over a mapped file, and it stays valid because the version it came from is released only after this call returns.


fun get(key: Key, snapshot: Snapshot): Variant?

The version of key that snapshot sees, or null if it was absent or deleted then.