src/Staging.bend fails
raw source on the hub · import ber-core-store@0.1.2.0/src/Staging.bend as Staging
7 imports
import Base import ./LogicalKey.bend as LogicalKey import ./ContentObject.bend as ContentObject import ./JsonAdapter.bend as JsonAdapter import ./Value.bend as Value import ./Store.bend as Store import bend-kit-json@0.3.0.0/json.bend as Json
Definitions
def stage_index_key source · line 16 · raw
@+session_identifier:String -> String
Addresses the per-session staged-key manifest.
def serialize_key_list source · line 20 · raw
@staged_keys:List<&2, String> -> String
Encodes the manifest as a canonical JSON string list.
def index_from_strings source · line 24 · raw
@strings_maybe:Maybe<&2, List<&2, String>> -> List<&2, String>
Treats a failed decode as an empty manifest.
def index_from_document source · line 32 · raw
@items_maybe:Maybe<&2, List<&2, 0xaaa10a97bf5ac6990143da2c863f8a3f/json.Val>> -> List<&2, String>
Unwraps the manifest array, then decodes.
def index_from_text source · line 40 · raw
@parse_result:Maybe<&2, 0xaaa10a97bf5ac6990143da2c863f8a3f/json.Val> -> List<&2, String>
Parses stored manifest text; malformed reads as empty.
def parse_stage_index source · line 48 · raw
@stored_maybe:Maybe<&2, String> -> List<&2, String>
Loads the manifest; missing storage reads as empty.
def decide_contains source · line 56 · raw
@head_matches:Bool -> @recursive_result:Bool -> Bool
True short-circuits the membership scan.
def contains_staged_key source · line 64 · raw
@+target_key:String -> @staged_keys:List<&2, String> -> Bool
Scans the manifest for the target key.
def prepend_unless_present source · line 72 · raw
@already_present:Bool -> @target_key:String -> @staged_keys:List<&2, String> -> List<&2, String>
Prepends unless already present.
def add_key_unless_present source · line 80 · raw
@+target_key:String -> @+staged_keys:List<&2, String> -> List<&2, String>
Adds the key unless the manifest has it.
def load_stage_index source · line 84 · raw
@+session_identifier:String -> 0x785d1b078f7f99a4ee2b9c7798398bc9/src/Store.Op<&2, List<&2, String>>
Loads the session manifest.
def record_stage_entry source · line 90 · raw
@+session_identifier:String -> @+namespace_name:String -> @+record_identifier:String -> @value_hash:String -> 0x785d1b078f7f99a4ee2b9c7798398bc9/src/Store.Op<&2, 0x785d1b078f7f99a4ee2b9c7798398bc9/src/LogicalKey.LogicalKey>
Stores one staged value and records its key.
def put_record source · line 99 · raw
@+session_identifier:String -> @+namespace_name:String -> @+record_identifier:String -> @value:0x785d1b078f7f99a4ee2b9c7798398bc9/src/Value.Value -> 0x785d1b078f7f99a4ee2b9c7798398bc9/src/Store.Op<&2, 0x785d1b078f7f99a4ee2b9c7798398bc9/src/LogicalKey.LogicalKey>
Stages a value for later commit.
def delete_record source · line 106 · raw
@+session_identifier:String -> @+namespace_name:String -> @+record_identifier:String -> 0x785d1b078f7f99a4ee2b9c7798398bc9/src/Store.Op<&2, 0x785d1b078f7f99a4ee2b9c7798398bc9/src/LogicalKey.LogicalKey>
Stages a tombstone for later commit.