Class: Mongo::Error::UnsupportedOption
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Error
|
|
|
Instance Chain:
self,
Error
|
|
| Inherits: |
Error
|
| Defined in: | lib/mongo/error/unsupported_option.rb |
Overview
Raised if an unsupported option is specified for an operation.
Constant Summary
-
ALLOW_DISK_USE_MESSAGE =
Internal use only
# File 'lib/mongo/error/unsupported_option.rb', line 44
The error message provided when the user passes the allow_disk_use option to a find operation against a server that does not support the allow_disk_use operation and does not provide option validation.
'The MongoDB server handling this request does ' \ 'not support the allow_disk_use option on this command. The ' \ 'allow_disk_use option is supported on find commands on MongoDB ' \ 'server versions 4.4 and later'
-
COMMIT_QUORUM_MESSAGE =
Internal use only
# File 'lib/mongo/error/unsupported_option.rb', line 54
The error message provided when the user passes the commit_quorum option to a createIndexes operation against a server that does not support that option.
'The MongoDB server handling this request does ' \ 'not support the commit_quorum option on this command. The commit_quorum ' \ 'option is supported on createIndexes commands on MongoDB server versions ' \ '4.4 and later'
-
HINT_MESSAGE =
Internal use only
# File 'lib/mongo/error/unsupported_option.rb', line 26
The error message provided when the user passes the hint option to a write operation against a server that does not support the hint option and does not provide option validation.
'The MongoDB server handling this request does not support ' \ 'the hint option on this command. The hint option is supported on update ' \ 'commands on MongoDB server versions 4.2 and later and on findAndModify ' \ 'and delete commands on MongoDB server versions 4.4 and later'
-
UNACKNOWLEDGED_HINT_MESSAGE =
Internal use only
# File 'lib/mongo/error/unsupported_option.rb', line 35
The error message provided when the user passes the hint option to an unacknowledged write operation.
'The hint option cannot be specified on ' \ 'an unacknowledged write operation. Remove the hint option or perform ' \ 'this operation with a write concern of at least { w: 1 }'
Class Method Summary
-
.allow_disk_use_error ⇒ Mongo::Error::UnsupportedOption
Internal use only
Internal use only
Raise an error about an unsupported allow_disk_use option.
-
.commit_quorum_error ⇒ Mongo::Error::UnsupportedOption
Internal use only
Internal use only
Raise an error about an unsupported commit_quorum option.
-
.hint_error(**options) ⇒ Mongo::Error::UnsupportedOption
Internal use only
Internal use only
Raise an error about an unsupported hint option.
Class Method Details
.allow_disk_use_error ⇒ UnsupportedOption
Raise an error about an unsupported allow_disk_use option.
# File 'lib/mongo/error/unsupported_option.rb', line 87
def self.allow_disk_use_error new(ALLOW_DISK_USE_MESSAGE) end
.commit_quorum_error ⇒ UnsupportedOption
Raise an error about an unsupported commit_quorum option.
# File 'lib/mongo/error/unsupported_option.rb', line 97
def self.commit_quorum_error new(COMMIT_QUORUM_MESSAGE) end
.hint_error(**options) ⇒ UnsupportedOption
Raise an error about an unsupported hint option.
# File 'lib/mongo/error/unsupported_option.rb', line 69
def self.hint_error(**) unacknowledged_write = [:unacknowledged_write] || false = if unacknowledged_write UNACKNOWLEDGED_HINT_MESSAGE else HINT_MESSAGE end new() end