Xbasic

Extension::MongoDB Class

Description

MongoDB client, allows direct CRUD calls to a mongoDB server.

Properties

collectionCharacter

String collection property

baseURLCharacter

String baseURL property

databaseCharacter

String database property

errorTextCharacter

String errorText property

usernameCharacter

String username property

passwordCharacter

String password property

certificateCharacter

String certificate property

query_limitNumeric

Numeric query_limit property

query_skipNumeric

Numeric query_skip property

formatJsonLogical

Logical formatJson property

Methods

AddRecord Method

Adds a document db record using 'id'.

BulkOperation Method

Bulk add/remove/update record operation.

Create Method

Create a mongo object.

CreateIndex Method

Create a new index.

CriteriaToJavascript Method

Converts Mongo DB style JSON criteria into a javascript comparison expression where variables are under 'doc'.

DeleteRecord Method

Deletes a document db record using 'id'.

DropAllIndexes Method

Drop all indexes.

DropCollection Method

Drop a collection.

DropDatabase Method

Delete the mongo database.

DropIndex Method

Drop an existing index.

EnsureIndex Method

Create a new index if it does not already exist.

FunctionAdd Method

Define server side javascript function.

FunctionDrop Method

Remove server side javascript function.

GetAllRecords Method

Gets all records for a document database.

GetIndexes Method

Return the indexes for the collection.

GetRecord Method

Gets a document db record using 'id'.

GetRecords Method

Get records from mongo collection that match the criteria spec.

GetRecordsToResultSet Method

Get records from mongo collection into a result set, use passed in mapping.

ListCollections Method

Get collections in the current database.

ListDatabases Method

Get top level database list.

ListFunctions Method

Return a list of the javascript functions.

MapReduce Method

Get result of a map/Reduce against a mongo collection.

ReIndex Method

Drop an recreate all indexes.

RenameCollection Method

Rename a collection.

ServerSideEvaluate Method

evaluate a passed function on the server, passing values from passed JSON argument array string.

UpdateRecord Method

Updates a document db record using 'id'.

See Also