Class: Mongo::WriteConcern::Unacknowledged

Inherits:
Base
  • Object
show all
Defined in:
build/ruby-driver-v2.19/lib/mongo/write_concern/unacknowledged.rb

Overview

An unacknowledged write concern will provide no error on write outside of network and connection exceptions.

Since:

  • 2.0.0

Constant Summary collapse

NOOP =

The noop constant for the gle.

Since:

  • 2.0.0

nil

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Mongo::WriteConcern::Base

Instance Method Details

#acknowledged?true, false

Is this write concern acknowledged.

Examples:

Whether this write concern object is acknowledged.

write_concern.acknowledged?

Returns:

  • (true, false)

    Whether this write concern is acknowledged.

Since:

  • 2.5.0



51
52
53
# File 'build/ruby-driver-v2.19/lib/mongo/write_concern/unacknowledged.rb', line 51

def acknowledged?
  false
end

#get_last_errornil

Get the gle command for an unacknowledged write.

Examples:

Get the gle command.

unacknowledged.get_last_error

Returns:

  • (nil)

    The noop.

Since:

  • 2.0.0



39
40
41
# File 'build/ruby-driver-v2.19/lib/mongo/write_concern/unacknowledged.rb', line 39

def get_last_error
  NOOP
end

#inspectString

Get a human-readable string representation of an unacknowledged write concern.

Examples:

Inspect the write concern.

write_concern.inspect

Returns:

  • (String)

    A string representation of an unacknowledged write concern.

Since:

  • 2.0.0



63
64
65
# File 'build/ruby-driver-v2.19/lib/mongo/write_concern/unacknowledged.rb', line 63

def inspect
  "#<Mongo::WriteConcern::Unacknowledged:0x#{object_id} options=#{options}>"
end