| Module | Mongo::Operation::Specifiable |
| In: |
lib/mongo/operation/shared/specifiable.rb
|
This module contains common functionality for convenience methods getting various values from the spec.
@since 2.0.0
| DB_NAME | = | :db_name.freeze |
The field for database name.
@since 2.0.0 |
|
| DELETES | = | :deletes.freeze |
The field for deletes.
@since 2.0.0 |
|
| DELETE | = | :delete.freeze |
The field for delete.
@since 2.0.0 |
|
| DOCUMENTS | = | :documents.freeze |
The field for documents.
@since 2.0.0 |
|
| COLL_NAME | = | :coll_name.freeze |
The field for collection name.
@since 2.0.0 |
|
| CURSOR_COUNT | = | :cursor_count.freeze |
The field for cursor count.
@since 2.0.0 |
|
| CURSOR_ID | = | :cursor_id.freeze |
The field for cursor id.
@since 2.0.0 |
|
| CURSOR_IDS | = | :cursor_ids.freeze |
The field for cursor ids.
@since 2.0.0 |
|
| INDEX | = | :index.freeze |
The field for an index.
@since 2.0.0 |
|
| INDEXES | = | :indexes.freeze |
The field for multiple indexes.
@since 2.0.0 |
|
| INDEX_NAME | = | :index_name.freeze |
The field for index names.
@since 2.0.0 |
|
| OPERATION_ID | = | :operation_id.freeze |
The operation id constant.
@since 2.1.0 |
|
| OPTIONS | = | :options.freeze |
The field for options.
@since 2.0.0 |
|
| READ_CONCERN | = | :read_concern.freeze |
The read concern option.
@since 2.2.0 |
|
| MAX_TIME_MS | = | :max_time_ms.freeze |
The max time ms option.
@since 2.2.5 |
|
| SELECTOR | = | :selector.freeze |
The field for a selector.
@since 2.0.0 |
|
| START_TRANSACTION | = | :start_transaction.freeze |
The startTransaction option
@since 2.6.0 |
|
| TO_RETURN | = | :to_return.freeze |
The field for number to return.
@since 2.0.0 |
|
| UPDATES | = | :updates.freeze |
The field for updates.
@since 2.0.0 |
|
| UPDATE | = | :update.freeze |
The field for update.
@since 2.0.0 |
|
| USER | = | :user.freeze |
The field name for a user.
@since 2.0.0 |
|
| USER_NAME | = | :user_name.freeze |
The field name for user name.
@since 2.0.0 |
|
| WRITE_CONCERN | = | :write_concern.freeze |
The field name for a write concern.
@since 2.0.0 |
|
| READ | = | :read.freeze |
The field name for the read
preference.
@since 2.0.0 |
|
| BYPASS_DOC_VALIDATION | = | :bypass_document_validation.freeze |
Whether to bypass document level validation.
@since 2.2.0 |
|
| COLLATION | = | :collation.freeze |
A collation to apply to the
operation.
@since 2.4.0 |
| spec | [R] | @return [ Hash ] spec The specification for the operation. |
Check equality of two specifiable operations.
@example Are the operations equal?
operation == other
@param [ Object ] other The other operation.
@return [ true, false ] Whether the objects are equal.
@since 2.0.0
Does the operation have an acknowledged write concern.
@example Determine whether the operation has an acknowledged write.
specifiable.array_filters
@return [ Boolean ] Whether or not the operation has an acknowledged write concern.
@since 2.5.2
The array filters.
@example Get the array filters.
specifiable.array_filters
@return [ Hash ] The array filters.
@since 2.5.2
Whether or not to bypass document level validation.
@example Get the bypass_document_validation option.
specifiable.bypass_documentation_validation.
@return [ true, false ] Whether to bypass document level validation.
@since 2.2.0
The name of the collection to which the operation should be sent.
@example Get the collection name.
specifiable.coll_name
@return [ String ] Collection name.
@since 2.0.0
Get the cursor count from the spec.
@example Get the cursor count.
specifiable.cursor_count
@return [ Integer ] The cursor count.
@since 2.0.0
The id of the cursor created on the server.
@example Get the cursor id.
specifiable.cursor_id
@return [ Integer ] The cursor id.
@since 2.0.0
The ids of the cursors to kill from the spec.
@example Get the cursor ids from the spec.
specifiable.cursor_ids
@return [ Array<Integer> ] The cursor ids.
@since 2.0.0
The name of the database to which the operation should be sent.
@example Get the database name.
specifiable.db_name
@return [ String ] Database name.
@since 2.0.0
Get the max time ms value from the spec.
@example Get the max time ms.
specifiable.max_time_ms
@return [ Hash ] The max time ms value.
@since 2.2.5
Get the operation id for the operation. Used for linking operations in monitoring.
@example Get the operation id.
specifiable.operation_id
@return [ Integer ] The operation id.
@since 2.1.0
Whether the operation is ordered.
@example Get the ordered value, true is the default.
specifiable.ordered?
@return [ true, false ] Whether the operation is ordered.
@since 2.1.0
The read preference for this operation.
@example Get the read preference.
specifiable.read
@return [ Mongo::ServerSelector ] The read preference.
@since 2.0.0
The startTransaction option.
@example Get the startTransaction option.
specifiable.start_transaction
@return [ Boolean ] The startTransaction option.
The transaction number for the operation.
@example Get the transaction number.
specifiable.txn_num
@return [ Integer ] The transaction number.
@since 2.5.0
The user for user related operations.
@example Get the user.
specifiable.user
@return [ Auth::User ] The user.
@since 2.0.0
The write concern to use for this operation.
@example Get the write concern.
specifiable.write_concern
@return [ Mongo::WriteConcern ] The write concern.
@since 2.0.0