java.lang.Object | |
↳ | com.mongodb.WriteResult |
This class lets you access the results of the previous write. if you have STRICT mode on, this just stores the result of that getLastError call if you don't, then this will actually do the getlasterror call. if another operation has been done on this connection in the interim, calls will fail
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the last result from getLastError()
| |||||||||||
Gets the error String ("err" field)
| |||||||||||
Gets a field
| |||||||||||
Gets the last
WriteConcern used when calling getLastError() | |||||||||||
This method does following:
- returns the existing CommandResult if concern is null or less strict than the concern it was obtained with
- otherwise attempts to obtain a CommandResult by calling getLastError with the concern
| |||||||||||
calls
getLastError(com.mongodb.WriteConcern) with concern=null | |||||||||||
Gets the "n" field, which contains the number of documents
affected in the write operation.
| |||||||||||
Returns whether or not the result is lazy, meaning that getLastError was not called automatically
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This method does following: - returns the existing CommandResult if concern is null or less strict than the concern it was obtained with - otherwise attempts to obtain a CommandResult by calling getLastError with the concern
concern | the concern |
---|
calls getLastError(com.mongodb.WriteConcern)
with concern=null
Gets the "n" field, which contains the number of documents affected in the write operation.
Returns whether or not the result is lazy, meaning that getLastError was not called automatically