DIRECTORY DBCommon USING[DBPage], DBStorageTID USING[TID], DBStorageVec USING[SlotIndexField, VecPage, VecHeader]; DBStorageTSDict: CEDAR DEFINITIONS = BEGIN OPEN DBCommon, DBStorageTID; TSDictSlotIndex: DBStorageVec.SlotIndexField = 1; TSDict: TYPE = MACHINE DEPENDENT RECORD[ header: DBStorageVec.VecHeader, allocLink: DBPage, seq: ARRAY [1..1) OF TSDictEntry ];--TSDict TSDictEntry: TYPE = MACHINE DEPENDENT RECORD[ tuplesetID: TID, next: DBPage, prev: DBPage ];--TSDictEntry SizeOfInitialTSDict: CARDINAL = SIZE[TSDict] + SIZE[TSDictEntry]; SizeOfNullTSDict: CARDINAL = SIZE[TSDict]; NEntries: PROC[LONG POINTER TO TSDict] RETURNS[CARDINAL]; GetIndex: PROC[--p--LONG POINTER TO DBStorageVec.VecPage, --tsID--TID] RETURNS[--index--CARDINAL, --found it--BOOLEAN]; GetEntry: PROC[--p--LONG POINTER TO DBStorageVec.VecPage, --tsID--TID] RETURNS[LONG POINTER TO TSDictEntry]; EntryFromIndex: PROC[--p--LONG POINTER TO DBStorageVec.VecPage, --index--CARDINAL] RETURNS[LONG POINTER TO TSDictEntry]; END.--DBStorageTSDict CHANGE LOG Created by MBrown on June 14, 1980 9:10 PM Changed by MBrown on July 24, 1980 9:18 PM Changed by MBrown on August 12, 1980 4:03 PM Changed by Willie-Sue on February 15, 1985 ÂFile DBStorageTSDict.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by MBrown on August 12, 1980 4:03 PM Willie-Sue, February 15, 1985 11:18:03 am PST This interface defines types associated with tupleset dictionaries, and gives some operations on them. TSDicts live in a known slot, which allows operations below to take pointers to pages rather than pointers to TSDicts. The selection of interface operations seems QUITE ad-hoc; hopefully that will be fixed. Reserved slot index on tuple pages: This slot points to the tupleset dictionary vec. TSDict is stored in a vec, so prefix is a VecHeader TSDict is stored in a vec, so prefix is a VecHeader sequence of TSDictEntry, length implicit in header.length indices in this array are used as slot types; NOTE 1-origin links in a doubly-linked list of pages that contain tuples from this tupleset In addition to serving as a method of assigning short names to tuple types, the tupleset dictionary is used to link together all pages that contain tuples of a given type. This allows a tupleset to be scanned without looking at all pages in the segment. There is a corresponding cost when tuples are created and destroyed. Returns the number of TSDictEntries in the seq of a TSDict. This can be computed from the VecHeader. Returns index of the TSDictEntry on page p that contains tsID as its tuplesetID field. Second result is TRUE iff entry was actually found; otherwise we return 1+number of entries in the TSDict, and FALSE. Returns ptr to the TSDictEntry on page p that contains tsID as its tuplesetID field. ERRORs InternalBug if no such entry exists. Returns ptr to the index-th TSDictEntry on page p. ERRORs InternalBug if no such entry exists. Moved types here from DBStoragePrivateB, made procs accessible. Added EntryFromIndex, for use in StorageTuplesetScanImpl. Added allocLink field to TSDict. Moved TSDictSlotIndex here, from DBStoragePrivateB. made Cedar, added tioga formatting ʘšœ™Jšœ Ïmœ1™<—šœ1™1J™-—J˜šÏk ˜ Jšœ žœ ˜Jšœ žœžœ˜Jšœ žœ%˜7J˜—š œžœž œžœžœ˜GJšœR™RJšœ™JšœU™UJšœ ™ J˜JšœW™WJ˜J˜Jšœ#™#˜1Jšœ0™0J˜—š œžœžœž œžœ˜(˜Jšœ3™3—˜Jšœ3™3—šœžœžœ ˜ Jšœ9™9Jšœ;™;—JšœÏc˜ —J˜š œ žœžœž œžœ˜-Jšœ žœ˜J˜ ˜ JšœM™M—JšœŸ ˜—J™JšœO™OJšœO™OJšœQ™QJšœR™RJ˜Jšœžœžœ žœ˜AJšœžœžœ ˜*J˜šÏnœžœžœžœžœ žœžœ˜9JšœQ™QJšœ™J˜—š œžœŸžœžœžœŸžœ˜GšžœŸ žœŸ žœ˜0JšœV™VJšœ_™_Jšœ™J˜——š œžœŸžœžœžœŸžœ˜Gšžœžœžœžœ˜%JšœT™TJšœ+™+J˜——š œžœŸžœžœžœŸ žœ˜Sšžœžœžœžœ˜%Jšœ2™2Jšœ+™+J˜J˜———JšžœŸ˜J˜J˜Jšžœž˜ J˜Jšœ)ž˜+Jšœ?™?J˜Jšœ)ž˜+Jšœ[™[J˜Jšœ+ž˜-Jšœ3™3J™Jšœ*˜*J™"J˜—…—έ