File tree Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ functions:
282282 DRIVER="${DRIVER}" \
283283 I18N="${I18N}" \
284284 TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
285- ./egos .evergreen/run-tests-docker .sh
285+ ./egos .evergreen/run-tests.sh
286286
287287 " fix absolute paths " :
288288 - command : shell.exec
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ functions:
256256 DRIVER="${DRIVER}" \
257257 I18N="${I18N}" \
258258 TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
259- ./egos .evergreen/run-tests-docker .sh
259+ ./egos .evergreen/run-tests.sh
260260
261261 "fix absolute paths":
262262 - command: shell.exec
Original file line number Diff line number Diff line change @@ -767,3 +767,40 @@ Support for individually caching criteria objects has been dropped in Mongoid 8.
767767
768768In order to get caching functionality, enable the Mongoid Query Cache. See the
769769section on :ref:`Query Cache <query-cache>` for more details.
770+
771+
772+ BSON 5 and BSON::Decimal128 Fields
773+ ----------------------------------
774+
775+ When BSON 4 or earlier is present, any field declared as BSON::Decimal128 will
776+ return a BSON::Decimal128 value. When BSON 5 is present, however, any field
777+ declared as BSON::Decimal128 will return a BigDecimal value by default.
778+
779+ .. code-block:: ruby
780+
781+ class Model
782+ include Mongoid::Document
783+
784+ field :decimal_field, type: BSON::Decimal128
785+ end
786+
787+ # under BSON <= 4
788+ Model.first.decimal_field.class #=> BSON::Decimal128
789+
790+ # under BSON >= 5
791+ Model.first.decimal_field.class #=> BigDecimal
792+
793+ If you need literal BSON::Decimal128 values with BSON 5, you may instruct
794+ Mongoid to allow literal BSON::Decimal128 fields:
795+
796+ .. code-block:: ruby
797+
798+ Model.first.decimal_field.class #=> BigDecimal
799+
800+ Mongoid.allow_bson5_decimal128 = true
801+ Model.first.decimal_field.class #=> BSON::Decimal128
802+
803+ .. note::
804+
805+ The ``allow_bson5_decimal128`` option only has any effect under
806+ BSON 5 and later. BSON 4 and earlier ignore the setting entirely.
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Mongoid
4- VERSION = "8.0.5 "
4+ VERSION = "8.0.6 "
55end
You can’t perform that action at this time.
0 commit comments