DIRECTORY DBCache USING[CacheHandle], DBCommon USING[DBPage], DBEnvironment USING[InternalError], DBSegment USING[SegmentIDFromDBPage], DBStorage USING[TupleHandle, IndexObjectSize, ReadNWord, WriteNWord], DBStorageField USING[TuplesetFieldHandle], DBStorageInternal USING[TupleTree, TupleTreeRecord, TID], DBStorageTID USING[TID, DecomposeTID], DBStorageTuple USING[ConsTupleObject, TIDOfTuple]; DBStorageInternalImpl: CEDAR PROGRAM IMPORTS DBEnvironment, DBSegment, DBStorage, DBStorageField, DBStorageTID, DBStorageTuple EXPORTS DBStorageInternal = BEGIN OPEN DBStorageTID; ReadIndexObject: PUBLIC PROC[ t: DBStorage.TupleHandle, result: DBStorageInternal.TupleTree] = { IF SIZE[DBStorageInternal.TupleTreeRecord] > DBStorage.IndexObjectSize THEN ERROR DBEnvironment.InternalError; DBStorage.ReadNWord[t, DBStorageField.TuplesetFieldHandle[], result]; };--ReadIndexObject WriteIndexObject: PUBLIC PROC[ t: DBStorage.TupleHandle, val: DBStorageInternal.TupleTree] = { IF SIZE[DBStorageInternal.TupleTreeRecord] # DBStorage.IndexObjectSize THEN ERROR DBEnvironment.InternalError; DBStorage.WriteNWord[t, DBStorageField.TuplesetFieldHandle[], val]; };--WriteIndexObject SegmentIDOfTuple: PUBLIC PROC[ t: DBStorage.TupleHandle] RETURNS[--segmentID--DBCommon.DBPage] = { dbPage: DBCommon.DBPage; [dbPage,] _ DecomposeTID[TIDOfTuple[t]]; RETURN[DBSegment.SegmentIDFromDBPage[dbPage]]; };--SegmentIDOfTuple TIDOfTuple: PUBLIC PROC[t: DBStorage.TupleHandle] RETURNS[DBStorageInternal.TID] = { RETURN[DBStorageTuple.TIDOfTuple[t]]; };--TIDOfTuple MakeTupleHandle: PUBLIC PROC[ tid: DBStorageInternal.TID, cacheHint: DBCache.CacheHandle _ NIL] RETURNS[DBStorage.TupleHandle] = { RETURN[DBStorageTuple.ConsTupleObject[tid: tid, cacheHint: cacheHint]]; };--MakeTupleHandle END.--StorageInternalImpl CHANGE LOG Created by MBrown on 9-May-80 10:54 Changed by MBrown on June 8, 1980 9:35 PM Changed by MBrown on June 11, 1980 3:53 PM Changed by MBrown on September 26, 1980 4:35 PM Changed by MBrown on February 27, 1981 5:25 PM Changed by MBrown on 17-Jun-81 10:32:40 Changed by Willie-Sue on February 15, 1985 RFile: DBStorageInternalImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by MBrown on 17-Jun-81 10:33:47 Last Edited by: Cattell, September 29, 1983 6:43 pm Willie-Sue, February 15, 1985 3:28:06 pm PST This module implements DBStorageInternal. PARAMETERS: t is an index tuple, i.e. a tuple whose first field is an index object; result points to a TupleTreeRecord that may be overwritten. EFFECTS: the index object contained in tuple t is written into result. PARAMETERS: an index tuple, i.e. a tuple whose first field is an index object, and a value for such and object. EFFECTS: writes the value val into the index object field of tuple t. RESULTS: the "segment ID" of the segment that contains tuple t. RESULTS: the TID of tuple t (suitable for storing in an index). RESULTS: a tuple handle that contains the given TID and CacheHandle. Changed to use DBStorageField. Changed to use DBStorageTuple. Converted to new DBException. Pre-Pilot changes. ReleaseTupleHandle is now a no-op, remove from here and make INLINE in interface. made Cedar, added tioga formatting. ʘšœ ™ Jšœ Ïmœ1™<—Jšœ+™+šœ3™3J™,—J˜J˜šÏk ˜ Jšœžœ˜Jšœ žœ ˜Jšœžœ˜#Jšœ žœ˜%Jšœ žœ6˜EJšœžœ˜*Jšœžœžœ˜9Jšœ žœžœ˜&Jšœžœ˜2J˜—šœžœž˜$šž˜J˜J˜ J˜ J˜J˜ J˜—šž˜J˜—J˜Jšœžœžœ˜Ihead1šœ)™)J˜šÏnœžœžœ˜J˜BJšœS™SJšœ;™;JšœF™Fšžœžœ@ž˜KJšžœ˜"—J˜FJšœÏc˜—J˜šŸœžœžœ˜J˜?JšœN™NJšœ ™ JšœE™Ešžœžœ@ž˜KJšžœ˜"—J˜CJšœ ˜—J˜šŸœžœžœ˜Jšœžœ  œ˜CJšœ?™?J˜J˜(Jšžœ(˜.Jšœ ˜—J˜š Ÿ œžœžœžœžœ˜TJšœ?™?Jšžœ˜%Jšœ  ˜—J˜šŸœžœžœ˜Jšœžœ#žœ˜Ašžœ˜"JšœD™DJšžœA˜G—Jšœ ˜—J˜—Jšžœ ˜J˜J˜Jšžœž˜ J˜J˜$J˜Jšœ(ž˜*Jšœ™J˜Jšœ)ž˜+Jšœ™J˜Jšœ.ž˜0Jšœ™J˜Jšœ-ž˜/Jšœ™J˜J˜'JšœQ™QJ˜J˜*Jšœ#™#J˜J˜—…—P§