<<>> <> <> <> <> <> <> <> <<>> DIRECTORY BTreeSimple USING [PathStk, Tree], IO USING [STREAM], RefTab USING [Ref], Rope USING [ROPE], LoganBerry ; LoganBerryStructure: CEDAR DEFINITIONS ~ BEGIN OPEN LoganBerry; ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; <> <> <<>> LogAddress: TYPE = INT; EndOfEntry: CHAR = '\n; UpdateComplete: CHAR = 377C; <> <<>> <<>> IndexEntry: TYPE = RECORD [ log: LogID, firstByte: LogAddress ]; IndexPtr: TYPE = LONG POINTER TO IndexEntry; <> <> <<>> CursorInfo: TYPE = REF CursorRecord; CursorRecord: TYPE = RECORD[ dbinfo: OpenDBInfo, key: AttributeType, start, end: AttributeValue, index: OpenIndexInfo, current: AttributeValue, pathStk: BTreeSimple.PathStk ]; <> <> <<>> <<>> OpenIndexInfo: TYPE = REF OpenIndexInfoRecord; OpenIndexInfoRecord: TYPE = RECORD[ key: AttributeType, type: {primary, secondary}, order: ATOM ¬ $lex, -- ordering of index, e.g. $lex, $ascii, $gmt, $int filename: ROPE, readBacking: STREAM ¬ NIL, writeBacking: STREAM ¬ NIL, btree: BTreeSimple.Tree ]; IndexSet: TYPE = RefTab.Ref; --AttributeType <-> OpenIndexInfo <> <<>> <<>> OpenLogInfo: TYPE = REF OpenLogInfoRecord; OpenLogInfoRecord: TYPE = RECORD[ id: LogID, <> access: {readOnly, readWrite}, filename: ROPE, readStream: STREAM ¬ NIL, writeStream: STREAM ¬ NIL ]; LogSet: TYPE = REF LogSetRecord; LogSetRecord: TYPE = RECORD[seq: SEQUENCE size: LogID OF OpenLogInfo]; <> <<>> <<>> OpenDBInfo: TYPE = REF OpenDBRecord; OpenDBRecord: TYPE = MONITORED RECORD[ dbName: ROPE, isOpen: BOOLEAN, remoteAccess: BOOLEAN, openForUpdate: BOOLEAN, transStarted: BOOLEAN, statusMsg: ROPE, indices: IndexSet, primaryIndex: OpenIndexInfo, logs: LogSet ]; <" are deemed to contain schema information for the file named in the subsequent line of the DF file or at the end of the same line. The two types of schema entries are as follows:>> <<--> log >> <<--> index >> <<>> SchemaChars: REF READONLY TEXT; -- currently the string "- - >" END. <<>> <> <> <<, OpenDBRecord>> <> <> <> <> <<>> << >>