haskey-btree-0.1.0.0: B+-tree implementation in Haskell.

Safe HaskellNone
LanguageHaskell2010

Data.BTree.Primitives.Ids

Synopsis

Documentation

type OverflowId = (TxId, Word32) Source #

Reference to a stored overflow page.

An overflow id is the combination of the transaction id that generated it, and a counter.

newtype PageSize Source #

Type used to indicate the size of a single physical page in bytes.

Constructors

PageSize 

Fields

Instances

Enum PageSize Source # 
Eq PageSize Source # 
Integral PageSize Source # 
Num PageSize Source # 
Ord PageSize Source # 
Real PageSize Source # 
Show PageSize Source # 
Binary PageSize Source # 

Methods

put :: PageSize -> Put #

get :: Get PageSize #

putList :: [PageSize] -> Put #

newtype NodeId height key val Source #

Reference to a stored Node.

NodeId has phantom type arguments for the parameters of Node to be able to enforce consistency. In a setting with a single storage pool this Id will essentially be a PageId with just the extra typing. In a multi storage pool setting NodeIds will additionally have to be resolved to PageIds by the node allocator.

Constructors

NodeId 

Fields

Instances

Eq (NodeId height key val) Source # 

Methods

(==) :: NodeId height key val -> NodeId height key val -> Bool #

(/=) :: NodeId height key val -> NodeId height key val -> Bool #

Num (NodeId height key val) Source # 

Methods

(+) :: NodeId height key val -> NodeId height key val -> NodeId height key val #

(-) :: NodeId height key val -> NodeId height key val -> NodeId height key val #

(*) :: NodeId height key val -> NodeId height key val -> NodeId height key val #

negate :: NodeId height key val -> NodeId height key val #

abs :: NodeId height key val -> NodeId height key val #

signum :: NodeId height key val -> NodeId height key val #

fromInteger :: Integer -> NodeId height key val #

Ord (NodeId height key val) Source # 

Methods

compare :: NodeId height key val -> NodeId height key val -> Ordering #

(<) :: NodeId height key val -> NodeId height key val -> Bool #

(<=) :: NodeId height key val -> NodeId height key val -> Bool #

(>) :: NodeId height key val -> NodeId height key val -> Bool #

(>=) :: NodeId height key val -> NodeId height key val -> Bool #

max :: NodeId height key val -> NodeId height key val -> NodeId height key val #

min :: NodeId height key val -> NodeId height key val -> NodeId height key val #

Show (NodeId height key val) Source # 

Methods

showsPrec :: Int -> NodeId height key val -> ShowS #

show :: NodeId height key val -> String #

showList :: [NodeId height key val] -> ShowS #

Binary (NodeId height key val) Source # 

Methods

put :: NodeId height key val -> Put #

get :: Get (NodeId height key val) #

putList :: [NodeId height key val] -> Put #

nodeIdToPageId :: NodeId height key val -> PageId Source #

Convert a NodeId to a PageId

pageIdToNodeId :: PageId -> NodeId height key val Source #

Convert a PageId to a NodeId

newtype TxId Source #

Transaction ids that are used as revision numbers.

Constructors

TxId 

Fields

Instances

Eq TxId Source # 

Methods

(==) :: TxId -> TxId -> Bool #

(/=) :: TxId -> TxId -> Bool #

Num TxId Source # 

Methods

(+) :: TxId -> TxId -> TxId #

(-) :: TxId -> TxId -> TxId #

(*) :: TxId -> TxId -> TxId #

negate :: TxId -> TxId #

abs :: TxId -> TxId #

signum :: TxId -> TxId #

fromInteger :: Integer -> TxId #

Ord TxId Source # 

Methods

compare :: TxId -> TxId -> Ordering #

(<) :: TxId -> TxId -> Bool #

(<=) :: TxId -> TxId -> Bool #

(>) :: TxId -> TxId -> Bool #

(>=) :: TxId -> TxId -> Bool #

max :: TxId -> TxId -> TxId #

min :: TxId -> TxId -> TxId #

Show TxId Source # 

Methods

showsPrec :: Int -> TxId -> ShowS #

show :: TxId -> String #

showList :: [TxId] -> ShowS #

Binary TxId Source # 

Methods

put :: TxId -> Put #

get :: Get TxId #

putList :: [TxId] -> Put #

Hashable TxId Source # 

Methods

hashWithSalt :: Int -> TxId -> Int #

hash :: TxId -> Int #

Value TxId Source # 
Key TxId Source # 

Methods

narrow :: TxId -> TxId -> (TxId, TxId) Source #