Sha256: a5548739775479dcb7efe8703aa730105cd6061dead1a8e058c371303acec74b

Contents?: true

Size: 1.77 KB

Versions: 50

Compression:

Stored size: 1.77 KB

Contents

- name: scalar field - matches exact value
  document:
    count: 10
  query:
    count:
      $nin: [10, 11]
  matches: false

- name: scalar field - does not match exact value
  document:
    count: 8
  query:
    count:
      $nin: [10, 11]
  matches: true

- name: scalar field - matches native regexp
  document:
    name: Boris
  query:
    name:
      $nin:
        - !ruby/regexp /..ris/
  matches: false

- name: scalar field - does not match native regexp
  document:
    name: Boris
  query:
    name:
      $nin:
        - !ruby/regexp /ri$/
  matches: true

- name: scalar field - matches bson regexp
  document:
    name: Boris
  query:
    name:
      $nin:
        - !ruby/object:BSON::Regexp::Raw
          pattern: ..ris
          options: ''
  matches: false

- name: scalar field - does not match bson regexp
  document:
    name: Boris
  query:
    name:
      $nin:
        - !ruby/object:BSON::Regexp::Raw
          pattern: ..ri$
          options: ''
  matches: true

- name: field value missing
  document:
    xcount: 10
  query:
    count:
      $nin: [10, 11]
  matches: true

- name: field value is null
  document:
    count: ~
  query:
    count:
      $nin: [10, 11]
  matches: true

- name: nil argument
  document:
    position: ceo
  query:
    position:
      $nin: ~
  error: true

- name: empty array argument
  document:
    position: ceo
  query:
    position:
      $nin: []
  matches: true

- name: empty hash argument
  document:
    position: ceo
  query:
    position:
      $nin: {}
  error: true

- name: numeric argument
  document:
    position: ceo
  query:
    position:
      $nin: 42
  error: true

- name: matching range
  document:
    age: 10
  query:
    age:
      $nin: !ruby/range
        begin: 1
        end: 20
        excl: false
  error: true

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
mongoid-8.0.10 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.6 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.10 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.5 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.9 spec/integration/matcher_operator_data/nin.yml
mongoid-8.0.9 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.4 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.8 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.7 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.3 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.6 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.2 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.1 spec/integration/matcher_operator_data/nin.yml
mongoid-9.0.0 spec/integration/matcher_operator_data/nin.yml
mongoid-8.0.8 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.5 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.4 spec/integration/matcher_operator_data/nin.yml
mongoid-8.0.7 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.3 spec/integration/matcher_operator_data/nin.yml
mongoid-8.1.2 spec/integration/matcher_operator_data/nin.yml