Module mongorover.resultObjects

Result objects that are returned from MongoDB CRUD operations.

resultObjects.DeleteResult Functions

DeleteResult.new (acknowledged, raw_result) Creates a MongoClient instance.
DeleteResult.isDeleteResult (object) Checks whether the object is an DeleteResult or not.

resultObjects.InsertManyResult Functions

InsertManyResult.new (raw_result, inserted_ids) Creates a InsertManyResult instance.
InsertManyResult.isInsertManyResult (object) Checks whether the object is an InsertManyResult or not.

resultObjects.InsertOneResult Functions

InsertOneResult.new (acknowledged, _id) Creates a InsertOneResult instance.
InsertOneResult.isInsertOneResult (object) Checks whether the object is an InsertOneResult or not.

resultObjects.UpdateResult Functions

UpdateResult.new (raw_result) Creates an UpdateOneResult instance.
UpdateResult.isUpdateResult (object) Checks whether object is an UpdateResult or not.


resultObjects.DeleteResult Functions

DeleteResult.new (acknowledged, raw_result)
Creates a MongoClient instance. Uses MongoDB connection URI (http://docs.mongodb.org/manual/reference/connection-string/).

Parameters:

  • acknowledged bool Response from server.
  • raw_result string The response from the server converted into a Lua table.
DeleteResult.isDeleteResult (object)
Checks whether the object is an DeleteResult or not.

Parameters:

  • object The object to be checked whether it is an DeleteResult.

Returns:

    bool Whether the object is an DeleteResult or not.

resultObjects.InsertManyResult Functions

InsertManyResult.new (raw_result, inserted_ids)
Creates a InsertManyResult instance.

Parameters:

  • raw_result table Response from MongoDB converted into a Lua table.
  • inserted_ids {table,...} Array of _ids that were inserted.
InsertManyResult.isInsertManyResult (object)
Checks whether the object is an InsertManyResult or not.

Parameters:

  • object The object to be checked whether it is an InsertManyResult.

Returns:

    bool Whether the object is an InsertManyResult or not.

resultObjects.InsertOneResult Functions

InsertOneResult.new (acknowledged, _id)
Creates a InsertOneResult instance.

Parameters:

  • acknowledged bool Whether the insert was acknowledged or not.
  • _id The _id of the inserted document.
InsertOneResult.isInsertOneResult (object)
Checks whether the object is an InsertOneResult or not.

Parameters:

  • object The object to be checked whether it is an InsertOneResult.

Returns:

    bool Whether the object is an InsertOneResult or not.

resultObjects.UpdateResult Functions

UpdateResult.new (raw_result)
Creates an UpdateOneResult instance.

Parameters:

  • raw_result table The response from the server after an update converted to a Lua table.
UpdateResult.isUpdateResult (object)
Checks whether object is an UpdateResult or not.

Parameters:

  • object The object to be checked whether it is an UpdateResult.

Returns:

    bool Whether the object is an UpdateResult or not.
generated by LDoc 1.4.3 Last updated 2015-09-16 03:55:02