| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
U.Codebase.Sqlite.Branch.Format
Synopsis
- data BranchFormat' text defRef patchRef childRef branchRef
- = Full (BranchLocalIds' text defRef patchRef childRef) LocalBranch
- | Diff branchRef (BranchLocalIds' text defRef patchRef childRef) LocalDiff
- type BranchFormat = BranchFormat' TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId) BranchObjectId
- type HashBranchFormat = BranchFormat' Text ComponentHash PatchHash (BranchHash, CausalHash)
- type BranchLocalIds = BranchLocalIds' TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId)
- data BranchLocalIds' t d p c = LocalIds {
- branchTextLookup :: Vector t
- branchDefnLookup :: Vector d
- branchPatchLookup :: Vector p
- branchChildLookup :: Vector c
- type HashBranchLocalIds = BranchLocalIds' Text ComponentHash PatchHash (BranchHash, CausalHash)
- type SyncBranchFormat = SyncBranchFormat' BranchObjectId TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId)
- data SyncBranchFormat' parent text defn patch child
- = SyncFull (BranchLocalIds' text defn patch child) LocalBranchBytes
- | SyncDiff parent (BranchLocalIds' text defn patch child) LocalBranchBytes
- newtype LocalBranchBytes = LocalBranchBytes ByteString
- localToDbBranch :: BranchLocalIds -> LocalBranch -> DbBranch
- localToDbDiff :: BranchLocalIds -> LocalDiff -> Diff
- localToHashBranch :: HashBranchLocalIds -> LocalBranch -> HashBranch
- localToBranch :: (Ord t, Ord d) => BranchLocalIds' t d p c -> LocalBranch -> Branch' t d p c
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
| (Show text, Show defRef, Show patchRef, Show childRef, Show branchRef) => Show (BranchFormat' text defRef patchRef childRef branchRef) Source # | |
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 BranchFormat = BranchFormat' TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId) BranchObjectId Source #
The BranchFormat' used to store a branch in Sqlite
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 #
Constructors
| LocalIds | |
Fields
| |
Instances
| (Show t, Show d, Show p, Show c) => Show (BranchLocalIds' t d p c) Source # | |
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 # | |
| (Eq t, Eq d, Eq p, Eq c) => Eq (BranchLocalIds' t d p c) Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods (==) :: BranchLocalIds' t d p c -> BranchLocalIds' t d p c -> Bool # (/=) :: BranchLocalIds' t d p c -> BranchLocalIds' t d p c -> Bool # | |
type HashBranchLocalIds = BranchLocalIds' Text ComponentHash PatchHash (BranchHash, CausalHash) Source #
type SyncBranchFormat = SyncBranchFormat' BranchObjectId TextId ObjectId PatchObjectId (BranchObjectId, CausalHashId) Source #
data SyncBranchFormat' parent text defn patch child Source #
Constructors
| SyncFull (BranchLocalIds' text defn patch child) LocalBranchBytes | |
| SyncDiff parent (BranchLocalIds' text defn patch child) LocalBranchBytes |
Instances
| (Show text, Show defn, Show patch, Show child, Show parent) => Show (SyncBranchFormat' parent text defn patch child) Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods showsPrec :: Int -> SyncBranchFormat' parent text defn patch child -> ShowS # show :: SyncBranchFormat' parent text defn patch child -> String # showList :: [SyncBranchFormat' parent text defn patch child] -> ShowS # | |
| (Eq text, Eq defn, Eq patch, Eq child, Eq parent) => Eq (SyncBranchFormat' parent text defn patch child) Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods (==) :: SyncBranchFormat' parent text defn patch child -> SyncBranchFormat' parent text defn patch child -> Bool # (/=) :: SyncBranchFormat' parent text defn patch child -> SyncBranchFormat' parent text defn patch child -> Bool # | |
newtype LocalBranchBytes Source #
Bytes encoding a LocalBranch
Constructors
| LocalBranchBytes ByteString |
Instances
| Show LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods showsPrec :: Int -> LocalBranchBytes -> ShowS # show :: LocalBranchBytes -> String # showList :: [LocalBranchBytes] -> ShowS # | |
| Eq LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods (==) :: LocalBranchBytes -> LocalBranchBytes -> Bool # (/=) :: LocalBranchBytes -> LocalBranchBytes -> Bool # | |
| Ord LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format Methods compare :: LocalBranchBytes -> LocalBranchBytes -> Ordering # (<) :: LocalBranchBytes -> LocalBranchBytes -> Bool # (<=) :: LocalBranchBytes -> LocalBranchBytes -> Bool # (>) :: LocalBranchBytes -> LocalBranchBytes -> Bool # (>=) :: LocalBranchBytes -> LocalBranchBytes -> Bool # max :: LocalBranchBytes -> LocalBranchBytes -> LocalBranchBytes # min :: LocalBranchBytes -> LocalBranchBytes -> LocalBranchBytes # | |
localToDbBranch :: BranchLocalIds -> LocalBranch -> DbBranch Source #
localToDbDiff :: BranchLocalIds -> LocalDiff -> Diff Source #
localToBranch :: (Ord t, Ord d) => BranchLocalIds' t d p c -> LocalBranch -> Branch' t d p c Source #