DIRECTORY DBCommon USING[TID], DBIndex USING [Page, IndexKey, State]; DBIndexOp: CEDAR DEFINITIONS = { Page: TYPE = DBIndex.Page; State: TYPE = DBIndex.State; IndexKey: TYPE = DBIndex.IndexKey; OverFlow: PROC [p: Page, key: REF TEXT] RETURNS [BOOLEAN]; EntrySize: PROC [p: Page, i: CARDINAL] RETURNS [CARDINAL]; RopeForKey: PROC[key: IndexKey] RETURNS[REF TEXT]; SplitPage: PROC [p: Page, loc: CARDINAL, insertSize: INTEGER] RETURNS [splitLoc: CARDINAL, splitKey: REF TEXT, overflow: Page]; SplitLeaf: PROC [p: Page, key: REF TEXT, value: LONG CARDINAL] RETURNS [Page, REF TEXT]; SplitInternal: PROC [p: Page, insertLoc: CARDINAL, key: REF TEXT, value: LONG CARDINAL] RETURNS [Page, REF TEXT]; InsertInInternalPage: PROC [p: Page, i: CARDINAL, newPage: LONG CARDINAL, newKey: REF TEXT] RETURNS [State, Page, REF TEXT]; DeleteFromLeafPage: PROC [p: Page, key: REF TEXT, tid: DBCommon.TID] RETURNS [State, Page, REF TEXT]; MergeInLeafPage: PROC [p: Page, son: Page, index: CARDINAL] RETURNS [State, Page, REF TEXT]; ChangeKey: PROC[p: Page, newKey: REF TEXT, index: CARDINAL] RETURNS[state: State, overflow: Page, key: REF TEXT]; MoveScanIndexLeft: PUBLIC PROC [from, to: Page, nentries: CARDINAL]; MoveScanIndexRight: PUBLIC PROC [from, to: Page, after: CARDINAL]; DecrementScanIndex: PROC [page: Page, atOrAfter: CARDINAL]; IncrementScanIndex: PUBLIC PROC [page: Page, atOrAfter: CARDINAL, howMuch: CARDINAL _ 1]; }. Change log since Sept 82: By Cattell September 22, 1982 9:20 am: Re-organized DBIndex interfaces for isolating page writes. Moved some procs from here to DBIndexMod. Changed by Willie-Sue on February 15, 1985 ΰFile: DBIndexOp.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Willie-Sue, February 15, 1985 3:46:17 pm PST Donahue, May 22, 1986 12:04:35 pm PDT Contents: General operations on pages of B-trees. Derived from: DBIndexLeaf created November 26, 1980 Last edited by: Cattell: July 19, 1983 3:34 pm Returns the size of the entry: key plus value The page overflows if we insert pair. We allocate a page to the right of p and moves contents, and insert at the same time. Sets indexed key in leaf page p to be newKey. "from" is to the right of "to" moves the first "nentries" in "from" to "to" moves the scan index on "from" to "to", if the index is greater than "after" "to" is empty Decrements any effected scan indices by one, if they are on "page" with index greater or equal to "atOrAfter" Increments any effected scan indices by howMuch, if they are on "page" with index greater or equal to "atOrAfter" made Cedar, added tioga formatting ΚΘ˜šœ™Jšœ Οmœ1™