Sha256: 596eb2fa50bbd09521d9aadb3d7d010211a9fe0828e680dd2304d63833fd6a22

Contents?: true

Size: 901 Bytes

Versions: 6

Compression:

Stored size: 901 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

# This class is used for embedded matcher testing.
class Mop
  include Mongoid::Document

  # The dynamic attributes are used so that the tests can use various
  # field names as makes sense for the particular operator.
  include Mongoid::Attributes::Dynamic

  # We need some fields of specific types because the query conditions are
  # transformed differently based on the type of field being queried.
  field :int_field, type: Integer
  field :array_field, type: Array
  field :date_field, type: Date
  field :time_field, type: Time
  field :datetime_field, type: DateTime
  field :big_decimal_field, type: BigDecimal
  field :decimal128_field, type: BSON::Decimal128
  field :symbol_field, type: Symbol
  field :bson_symbol_field, type: BSON::Symbol::Raw
  field :regexp_field, type: Regexp
  field :bson_regexp_field, type: BSON::Regexp::Raw
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid-7.3.5 spec/support/models/mop.rb
mongoid-7.3.4 spec/support/models/mop.rb
mongoid-7.3.3 spec/support/models/mop.rb
mongoid-7.3.2 spec/support/models/mop.rb
mongoid-7.3.1 spec/support/models/mop.rb
mongoid-7.3.0 spec/support/models/mop.rb