Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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'
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 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 #
LocalIds | |
|
Instances
(Show t, Show d, Show p, Show c) => Show (BranchLocalIds' t d p c) Source # | |
Defined in U.Codebase.Sqlite.Branch.Format showsPrec :: Int -> BranchLocalIds' t d p c -> ShowS # show :: BranchLocalIds' t d p c -> String # showList :: [BranchLocalIds' t d p c] -> ShowS # |
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 #
SyncFull (BranchLocalIds' text defn patch child) LocalBranchBytes | |
SyncDiff parent (BranchLocalIds' text defn patch child) LocalBranchBytes |
newtype LocalBranchBytes Source #
Bytes encoding a LocalBranch
Instances
Show LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format showsPrec :: Int -> LocalBranchBytes -> ShowS # show :: LocalBranchBytes -> String # showList :: [LocalBranchBytes] -> ShowS # | |
Eq LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format (==) :: LocalBranchBytes -> LocalBranchBytes -> Bool # (/=) :: LocalBranchBytes -> LocalBranchBytes -> Bool # | |
Ord LocalBranchBytes Source # | |
Defined in U.Codebase.Sqlite.Branch.Format 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 #