Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Database.LSMTree.Internal.Page
Description
Utilities related to pages.
Synopsis
- newtype PageNo = PageNo {}
- nextPageNo :: PageNo -> PageNo
- newtype NumPages = NumPages Word
- getNumPages :: Integral i => NumPages -> i
- data PageSpan = PageSpan {
- pageSpanStart :: !PageNo
- pageSpanEnd :: !PageNo
- singlePage :: PageNo -> PageSpan
- multiPage :: PageNo -> PageNo -> PageSpan
- pageSpanSize :: PageSpan -> NumPages
Documentation
A 0-based number identifying a disk page.
nextPageNo :: PageNo -> PageNo Source #
Increment the page number.
Note: This does not ensure that the incremented page number exists within a given page span.
The number of pages contained by an index or other paging data-structure.
Note: This is a 0-based number; take care to ensure arithmetic underflow does not occur during subtraction operations!
getNumPages :: Integral i => NumPages -> i Source #
A span of pages, representing an inclusive interval of page numbers.
Typlically used to denote the contiguous page span for a database entry.
Constructors
PageSpan | |
Fields
|
singlePage :: PageNo -> PageSpan Source #
pageSpanSize :: PageSpan -> NumPages Source #