Interface IgoBsonBaseReader

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type IgoBsonBaseReader = interface(IInterface)

Description

Base interface for IgoBsonReader, IgoJsonReader and IgoBsonDocumentReader

Attributes
GUID['{A0592C3C-5E24-4424-9662-EA7F33BB1B9A}']

Hierarchy

  • IInterface
  • IgoBsonBaseReader

Overview

Methods

Public function GetState: TgoBsonReaderState;
Public function EndOfStream: Boolean;
Public function GetCurrentBsonType: TgoBsonType;
Public function GetBookmark: IgoBsonReaderBookmark;
Public procedure ReturnToBookmark(const ABookmark: IgoBsonReaderBookmark);
Public function ReadDocument: TgoBsonDocument;
Public function ReadArray: TgoBsonArray;
Public function ReadValue: TgoBsonValue;
Public function ReadBinaryData: TgoBsonBinaryData;
Public function ReadRegularExpression: TgoBsonRegularExpression;
Public function ReadBsonType: TgoBsonType;
Public function ReadName: String;
Public procedure SkipName;
Public procedure SkipValue;
Public function ReadBoolean: Boolean;
Public function ReadInt32: Integer;
Public function ReadInt64: Int64;
Public function ReadDouble: Double;
Public function ReadString: String;
Public function ReadDateTime: Int64;
Public function ReadTimestamp: Int64;
Public function ReadObjectId: TgoObjectId;
Public function ReadBytes: TBytes;
Public function ReadJavaScript: String;
Public function ReadJavaScriptWithScope: String;
Public procedure ReadNull;
Public procedure ReadUndefined;
Public procedure ReadMaxKey;
Public procedure ReadMinKey;
Public function ReadSymbol: String;
Public procedure ReadStartArray;
Public procedure ReadEndArray;
Public procedure ReadStartDocument;
Public procedure ReadEndDocument;

Properties

Public property State: TgoBsonReaderState read GetState;

Description

Methods

Public function GetState: TgoBsonReaderState;
 
Public function EndOfStream: Boolean;

Whether the reader is at the end of the stream.

Returns

True if at end of stream

Public function GetCurrentBsonType: TgoBsonType;

Gets the current BSON type in the stream.

Note: calls ReadBsonType if necessary.

Returns

The current BSON type.

Public function GetBookmark: IgoBsonReaderBookmark;

Gets a bookmark to the reader's current position and state.

You can use the returned bookmark to restore the state using ReturnToBookmark.

Returns

A bookmark.

Public procedure ReturnToBookmark(const ABookmark: IgoBsonReaderBookmark);

Returns the reader to previously bookmarked position and state.

AParameters: ABookmark: the bookmark to return to. This value has previously been acquired using GetBookmark.

Public function ReadDocument: TgoBsonDocument;

Reads a BSON Document from the stream.

Returns

The read BSON Document.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON Document, or the stream is invalid.
Public function ReadArray: TgoBsonArray;

Reads a BSON Array from the stream.

Returns

The read BSON Array.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON Array, or the stream is invalid.
Public function ReadValue: TgoBsonValue;

Reads a BSON value from the stream.

Returns

The read BSON value.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON value, or the stream is invalid.
Public function ReadBinaryData: TgoBsonBinaryData;

Reads a BSON Binary from the stream.

Returns

The read BSON Binary.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON Binary, or the stream is invalid.
Public function ReadRegularExpression: TgoBsonRegularExpression;

Reads a BSON Regular Expression from the stream.

Returns

The read BSON Regular Expression.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON Regular Expression, or the stream is invalid.
Public function ReadBsonType: TgoBsonType;

Reads a BSON type from the stream.

Returns

The read BSON type.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON type, or the stream is invalid.
Public function ReadName: String;

Reads the name of an element from the stream.

Returns

The read element name.

Exceptions raised
An
exception if the current position in the stream does not contain an element name, or the stream is invalid.
Public procedure SkipName;

Skips the name of an element.

Exceptions raised
An
exception if the current position in the stream does not contain an element name, or the stream is invalid.
Public procedure SkipValue;

Skips the value of an element.

Exceptions raised
An
exception if the current position in the stream does not contain an element value, or the stream is invalid.
Public function ReadBoolean: Boolean;

Reads a Boolean value from the stream.

Returns

The read Boolean value.

Exceptions raised
An
exception if the current position in the stream does not contain a Boolean value, or the stream is invalid.
Public function ReadInt32: Integer;

Reads a 32-bit Integer value from the stream.

Returns

The read Integer value.

Exceptions raised
An
exception if the current position in the stream does not contain a 32-bit Integer value, or the stream is invalid.
Public function ReadInt64: Int64;

Reads a 64-bit Integer value from the stream.

Returns

The read Integer value.

Exceptions raised
An
exception if the current position in the stream does not contain a 64-bit Integer value, or the stream is invalid.
Public function ReadDouble: Double;

Reads a Double value from the stream.

Returns

The read Double value.

Exceptions raised
An
exception if the current position in the stream does not contain a Double value, or the stream is invalid.
Public function ReadString: String;

Reads a String value from the stream.

Returns

The read String value.

Exceptions raised
An
exception if the current position in the stream does not contain a String value, or the stream is invalid.
Public function ReadDateTime: Int64;

Reads a DateTime value from the stream.

Returns

The read DateTime value as the number of UTC milliseconds since the Unix epoch.

Exceptions raised
An
exception if the current position in the stream does not contain a DateTime value, or the stream is invalid.
Public function ReadTimestamp: Int64;

Reads a Timestamp value from the stream.

Returns

The read Timestamp value.

Exceptions raised
An
exception if the current position in the stream does not contain a Timestamp value, or the stream is invalid.
Public function ReadObjectId: TgoObjectId;

Reads an ObjectId value from the stream.

Returns

The read ObjectId value.

Exceptions raised
An
exception if the current position in the stream does not contain a ObjectId value, or the stream is invalid.
Public function ReadBytes: TBytes;

Reads a Binary value from the stream as a byte array.

Returns

The read Binary value.

Exceptions raised
An
exception if the current position in the stream does not contain a BSON Binary, or the stream is invalid.
Public function ReadJavaScript: String;

Reads a JavaScript from the stream.

Returns

The read JavaScript.

Exceptions raised
An
exception if the current position in the stream does not contain a JavaScript, or the stream is invalid.
Public function ReadJavaScriptWithScope: String;

Reads a JavaScript with scope from the stream.

Note: call ReadStartDocument next to read the scope.

Returns

The read JavaScript.

Exceptions raised
An
exception if the current position in the stream does not contain a JavaScript with Scope, or the stream is invalid.
Public procedure ReadNull;

Reads a BSON Null value from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain a Null value, or the stream is invalid.
Public procedure ReadUndefined;

Reads a BSON Undefined value from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain a Undefined value, or the stream is invalid.
Public procedure ReadMaxKey;

Reads a BSON MaxKey value from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain a MaxKey value, or the stream is invalid.
Public procedure ReadMinKey;

Reads a BSON MinKey value from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain a MinKey value, or the stream is invalid.
Public function ReadSymbol: String;

Reads a BSON Symbol from the stream.

Returns

The read Symbol name.

Exceptions raised
An
exception if the current position in the stream does not contain a Symbol, or the stream is invalid.
Public procedure ReadStartArray;

Reads the start of a BSON Array from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain the start of a BSON Array, or the stream is invalid.
Public procedure ReadEndArray;

Reads the end of a BSON Array from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain the end of a BSON Array, or the stream is invalid.
Public procedure ReadStartDocument;

Reads the start of a BSON Document from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain the start of a BSON Document, or the stream is invalid.
Public procedure ReadEndDocument;

Reads the end of a BSON Document from the stream.

Exceptions raised
An
exception if the current position in the stream does not contain the end of a BSON Document, or the stream is invalid.

Properties

Public property State: TgoBsonReaderState read GetState;

The current state of the reader


Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26