<> <> <> <<>> <> <<>> DIRECTORY Rope USING [ROPE], LoganBerry; LoganBerryStub: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; <<>> AttributeType: TYPE = LoganBerry.AttributeType; AttributeValue: TYPE = LoganBerry.AttributeValue; Attribute: TYPE = LoganBerry.Attribute; Entry: TYPE = LoganBerry.Entry; LogID: TYPE = LoganBerry.LogID; activityLog: LogID = LoganBerry.activityLog; -- default log for updates <<>> Cursor: TYPE = LoganBerry.Cursor; CursorDirection: TYPE = LoganBerry.CursorDirection; OpenDB: TYPE = LoganBerry.OpenDB; SchemaInfo: TYPE = LoganBerry.SchemaInfo; <<>> Conv: TYPE = LoganBerry.Conv; Error: ERROR [ec: ErrorCode, explanation: ROPE _ NIL]; ErrorCode: TYPE = LoganBerry.ErrorCode; <> <<$BadSchema, -- the schema can not be parsed>> <<$CantOpenSchema, -- the schema file could not be opened>> <<$BadDBHandle, -- an invalid OpenDB handle was passed to some routine>> <<$BadCursor, -- an invalid cursor was passed to some routine>> <<$NoIndex, -- the key presented in a read or delete operation has no associated index>> <<$NoPrimaryKey, -- a new entry being written does not contain a primary key>> <<$ValueNotUnique, -- a new entry being written contains the same primary key value as an existing entry, or the value supplied for a delete does not uniquely specifiy an entry>> <<$CantOpenLog, -- a log file could not be opened>> <<$BadLogEntry, -- a log entry is of the wrong format>> <<$LogReadOnly, -- the specified log can not be updated>> <<$InvalidReplace, -- an entry being replaced is in a different log than its replacement >> <<$CantOpenIndex, -- a btree file could not be opened>> <<$BadIndex, -- a btree index is corrupted>> <<$DBClosed, -- the database has been closed>> <<$DBNotAvailable, -- the database has been taken out of general service>> <<$InternalError -- indicates some miscellaneous internal error>> Open: PROC [conv: Conv _ NIL, dbName: ROPE] RETURNS [db: OpenDB]; <> <> Describe: PROC [conv: Conv _ NIL, db: OpenDB] RETURNS [info: SchemaInfo]; <> <> ReadEntry: PROC [conv: Conv _ NIL, db: OpenDB, key: AttributeType, value: AttributeValue] RETURNS [entry: Entry, others: BOOLEAN]; <> <> EntryProc: TYPE = LoganBerry.EntryProc; EnumerateEntries: PROC [db: OpenDB, key: AttributeType, start: AttributeValue _ NIL, end: AttributeValue _ NIL, proc: EntryProc] RETURNS []; <> <> <> GenerateEntries: PROC [conv: Conv _ NIL, db: OpenDB, key: AttributeType, start: AttributeValue _ NIL, end: AttributeValue _ NIL] RETURNS [cursor: Cursor]; <> <> <<>> NextEntry: PROC [conv: Conv _ NIL, cursor: Cursor, dir: CursorDirection _ increasing] RETURNS [entry: Entry]; <> <> EndGenerate: PROC [conv: Conv _ NIL, cursor: Cursor] RETURNS []; <> WriteEntry: PROC [conv: Conv _ NIL, db: OpenDB, entry: Entry, log: LogID _ activityLog, replace: BOOLEAN _ FALSE] RETURNS []; <> <> DeleteEntry: PROC [conv: Conv _ NIL, db: OpenDB, key: AttributeType, value: AttributeValue] RETURNS []; <> <> Close: PROC [conv: Conv _ NIL, db: OpenDB] RETURNS []; <> <> <> BuildIndices: PROC [conv: Conv _ NIL, db: OpenDB] RETURNS []; <> CompactLogs: PROC [conv: Conv _ NIL, db: OpenDB] RETURNS []; <> END. <<>> <> <> <<>>