unison-codebase-sqlite-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

U.Codebase.Sqlite.Branch.Format

Synopsis

Documentation

data BranchFormat' text defRef patchRef childRef branchRef Source #

A BranchFormat is a deserialized namespace object (object.bytes).

you can use the exact same BranchLocalIds when converting between Full and BranchFormat'

Constructors

Full (BranchLocalIds' text defRef patchRef childRef) LocalBranch 
Diff branchRef (BranchLocalIds' text defRef patchRef childRef) LocalDiff 

Instances

Instances details
(Show text, Show defRef, Show patchRef, Show childRef, Show branchRef) => Show (BranchFormat' text defRef patchRef childRef branchRef) Source # 
Instance details

Defined in U.Codebase.Sqlite.Branch.Format

Methods

showsPrec :: Int -> BranchFormat' text defRef patchRef childRef branchRef -> ShowS #

show :: BranchFormat' text defRef patchRef childRef branchRef -> String #

showList :: [BranchFormat' text defRef patchRef childRef branchRef] -> ShowS #

type HashBranchFormat = BranchFormat' Text ComponentHash PatchHash (BranchHash, CausalHash) Source #

A BranchFormat which uses Hashes and Text for all its references, no Ids which are specific to a particular codebase.

type BranchLocalIds = BranchLocalIds' TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId) Source #

A BranchLocalIds is a mapping between local ids (local to this object) encoded as offsets, and actual database ids.

For example, a branchTextLookup vector of [50, 74] means "local id 0 corresponds to database text id 50, and local id 1 corresponds to database text id 74".

data BranchLocalIds' t d p c Source #

Instances

Instances details
(Show t, Show d, Show p, Show c) => Show (BranchLocalIds' t d p c) Source # 
Instance details

Defined in U.Codebase.Sqlite.Branch.Format

Methods

showsPrec :: Int -> BranchLocalIds' t d p c -> ShowS #

show :: BranchLocalIds' t d p c -> String #

showList :: [BranchLocalIds' t d p c] -> ShowS #

data SyncBranchFormat' parent text defn patch child Source #

Constructors

SyncFull (BranchLocalIds' text defn patch child) LocalBranchBytes 
SyncDiff parent (BranchLocalIds' text defn patch child) LocalBranchBytes 

localToBranch :: (Ord t, Ord d) => BranchLocalIds' t d p c -> LocalBranch -> Branch' t d p c Source #