Sha256: 7de61c55e182ee41f5ba94cc6d9c27737cacf30f64d7423ccf3acffca271edef

Contents?: true

Size: 517 Bytes

Versions: 34

Compression:

Stored size: 517 Bytes

Contents

- name: existing field - matches Code with Scope
  document:
    code: !ruby/object:BSON::CodeWithScope
      javascript: "this.value = name"
      scope: {name: "sid"}
  query:
    code:
      $type: 15
  matches: true

- name: existing field - does not match Code with Scope
  document:
    code: 42
  query:
    code:
      $type: 15
  matches: false

- name: Code - does not match
  document:
    code: !ruby/object:BSON::Code
      javascript: "var foo = 42;"
  query:
    code:
      $type: 15
  matches: false

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
mongoid-8.1.7 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-9.0.3 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.6 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-9.0.2 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-9.0.1 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-9.0.0 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.8 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.5 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.4 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.7 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.3 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.2 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.6 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-7.5.4 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.1 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.5 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.1.0 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-7.5.3 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.4 spec/integration/matcher_operator_data/type_code_with_scope.yml
mongoid-8.0.3 spec/integration/matcher_operator_data/type_code_with_scope.yml