DIRECTORY DB USING [Attribute, Domain, Relation, Relship, Version], Rope USING [ROPE], WalnutDefs USING [Segment]; WalnutSchema: CEDAR DEFINITIONS = BEGIN OPEN DB; ROPE: TYPE = Rope.ROPE; MsgDomain: READONLY Domain; MsgSetDomain: READONLY Domain; ServerDomain: READONLY Domain; gRootInfo: READONLY Relation; gRootFileStamp: READONLY Attribute; -- rootFile create date for this db gRootFileKey: READONLY Attribute; -- key from rootFile for this db gMailFor: READONLY Attribute; -- RName (ROPE) gLogInfo: READONLY Relation; gLogFileID: READONLY Attribute; -- int gOpInProgressPos: READONLY Attribute; -- int - long running operation Pos gFirstDestroyedMsgPos: READONLY Attribute; -- int gBytesInDestroyedMsgs: READONLY Attribute; -- int gParseLogInfo: READONLY Relation; gParseLogInProgress: READONLY Attribute; -- bool gParseLogPos: READONLY Attribute; -- int gExpungeInfo: READONLY Relation; gLogExpungePhase: READONLY Attribute; -- int gExpungeFileID: READONLY Attribute; -- int gCurrentLogPos: READONLY Attribute; -- int gExpungeLogPos: READONLY Attribute; -- int gNewMailInfo: READONLY Relation; gNewMailLogLength: READONLY Attribute; -- int gCopyNewMailLogPos: READONLY Attribute; -- int gAcceptNewMailLogPos: READONLY Attribute; -- int gAddingServerMsgs: READONLY Attribute; -- bool gLastNewMailTimeStamp: READONLY Attribute; -- time gReadArchiveInfo: READONLY Relation; gReadArchiveLogPos: READONLY Attribute; -- int gCopyReadArchiveLogPos: READONLY Attribute; -- int gVersionInfo: READONLY Relation; gMsgCount: READONLY Attribute; -- int (number of message in DB) gMsgSetCount: READONLY Attribute; -- int (number of msgSets in DB) gMsgSetsVersion: READONLY Attribute; -- int (version number for msgSets) sBasicInfo: READONLY Relation; -- One per Server sBIOf: READONLY Attribute; -- Server sBINum: READONLY Attribute; -- int (number of messages) msBasicInfo: READONLY Relation; -- One per MsgSet msBIOf: READONLY Attribute; -- MsgSet msBICount: READONLY Attribute; -- int (number of member msgs) msBIVersion: READONLY Attribute; -- int mTextInfo: READONLY Relation; -- One per Msg mTIOf: READONLY Attribute; -- Msg mTIHerald: READONLY Attribute; -- rope mTIShortNameLen: READONLY Attribute; -- int (for icon label, other uses) mTIEntryStart: READONLY Attribute; -- int (start of entry in log) mTITextOffset: READONLY Attribute; -- int (offset for text) mTITextLen: READONLY Attribute; -- int (length of text) mTIFormatLen: READONLY Attribute; -- int (length of formatting) mDisplayInfo: READONLY Relation; -- One per Msg mDIOf: READONLY Attribute; -- Msg mDITOCEntry: READONLY Attribute; -- rope mDIStartOfSubject: READONLY Attribute; -- int mDIHasBeenRead: READONLY Attribute; -- bool mInfo: READONLY Relation; -- One per Msg mInfoOf: READONLY Attribute; -- Msg mDateIs: READONLY Attribute; -- time mShowIs: READONLY Attribute; -- bool cdRelation: READONLY Relation; -- One per Msg / MsgSet pair cdMsg: READONLY Attribute; -- Msg cdMsgSet: READONLY Attribute; -- MsgSet cdDate: READONLY Attribute; -- time (of the Msg) rRootInfo: READONLY Relship; rLogInfo: READONLY Relship; rParseLogInfo: READONLY Relship; rExpungeInfo: READONLY Relship; rVersionInfo: READONLY Relship; rNewMailInfo: READONLY Relship; rReadArchiveInfo: READONLY Relship; Initialize: PROC [segment: WalnutDefs.Segment, version: Version _ NewOrOld]; SetSchemaVersion: PROC[segment: WalnutDefs.Segment]; END. RWalnutSchema.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Willie-Sue, June 11, 1985 2:08:29 pm PDT Types and entities in the Walnut message database Last Edited by: Willie-Sue, January 4, 1985 9:04:13 am PST Last Edited by: Wert, August 31, 1984 7:06:51 pm PDT Last Edited by: Donahue, February 2, 1985 9:30:14 am PST (Added NewMail and Archive log position info for restart) (Changed mDAInfo to be mInfo and changed mAccepted to be mShow -- in multiple log case, this attribute will be used for both Active and Deleted message set enumerations) Types Schema Variables Global Domains Global Info relations - one each per database gSchemaDateInfo: READONLY Relation; -- no-one needs to know this gSVDate: READONLY Attribute; -- time (of schema definition) Server entity Relation MsgSet entity relation Msg displaying relation Msg in MsgSet displayer relation Msg Date/Show relation Category/Date relation Global Relships Procedures This procedure initializes the database schema. A transaction must be open on the specified segment. The version parameter controls how much error checking you want when defining the database schema; the default value is normally sufficient. Specifying NewOnly indicates that all schema items must not previously exist, while OldOnly specifies that all items must previously exist. NewOrOld indicates that all items may or may not exist, and that they should be created if they don't exist. SchemaMismatch[explanation] -- schema version mismatch This is SIGNALed. If you RESUME the signal, the database will be erased. This is normally what you want, unless you want to preserve the database, or accidentally used the wrong version of the software. this proc erases the open database, declares and sets the correct schema version stamp, and then commits the database; it catches NO errors Ê®˜šÏb Ðbc™Jšœ Ïmœ1™—J˜šœ  œ ˜J˜Jšœ œ ¢$˜HJšœ œ ¢!˜CJšœ  œ ¢˜/—J˜šœ  œ ˜J˜Jšœ  œ¢˜*Jšœ œ¢#˜KJšœ œ ¢˜1Jšœ œ ¢˜1—J˜šœ œ ˜!J˜Jšœ œ ¢˜1Jšœ œ¢˜+—J˜šœ œ ˜ J˜Jšœ œ¢˜.Jšœ œ¢˜-Jšœ œ¢˜-Jšœ œ¢˜-J˜—šœ œ ˜ J˜Jšœ œ ¢˜/Jšœ œ ¢˜/Jšœ œ ¢˜1Jšœ œ¢˜0Jšœ œ ¢˜3—J˜šœ œ ˜$J˜Jšœ œ¢˜0Jšœ œ ¢˜2—J˜šœ œ ˜ J˜Jšœ  œ¢ ˜BJšœ œ¢ ˜DJšœ œ¢#˜J——J˜™J™šœ  œ¢˜3J˜Jšœ œ¢ ˜'Jšœ œ¢˜9——J™J™š¢œ¢œ™J˜šœ  œ¢˜4J˜Jšœ œ ¢ ˜)Jšœ  œ ¢!˜@Jšœ  œ ¢ ˜*——J˜J™š¢œ ¢œ™J˜šœ  œ ¢˜.J˜Jšœ œ ¢ ˜&Jšœ  œ¢˜*Jšœ œ ¢#˜HJšœ œ¢˜CJšœ œ¢˜=Jšœ  œ¢˜9Jšœ œ¢˜A——J˜J™š¢œ¢œ™ J˜šœ œ ¢˜1J˜Jšœ œ ¢ ˜&Jšœ  œ¢˜+Jšœ œ ¢˜/Jšœ œ ¢˜,——J™š¢œ ¢œ™J˜šœ œ¢˜+J˜Jšœ  œ ¢ ˜&Jšœ  œ ¢ ˜'Jšœ  œ ¢ ˜'——J™šœ™J˜šœ  œ¢˜>J˜Jšœ œ ¢ ˜&Jšœ  œ ¢ ˜+Jšœ œ ¢˜6——J™™J™Jšœ  œ ˜Jšœ  œ ˜Jšœ œ ˜ Jšœ œ ˜Jšœ œ ˜Jšœ œ ˜Jšœ œ ˜#——J˜š ™ J˜š¡ œ œ<˜LJ˜Jš œ0 œËœBœ1œd™êJ™šœ¢™6J™Jšœ œ«™Ê—J™—J™š¡œ œ˜4J™J™Œ——J˜—Jš œ˜—J˜—…— ÞÞ