File tree 4 files changed +40
-3
lines changed
4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ functions:
282
282
DRIVER="${DRIVER}" \
283
283
I18N="${I18N}" \
284
284
TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
285
- ./egos .evergreen/run-tests-docker .sh
285
+ ./egos .evergreen/run-tests.sh
286
286
287
287
" fix absolute paths " :
288
288
- command : shell.exec
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ functions:
256
256
DRIVER="${DRIVER}" \
257
257
I18N="${I18N}" \
258
258
TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
259
- ./egos .evergreen/run-tests-docker .sh
259
+ ./egos .evergreen/run-tests.sh
260
260
261
261
"fix absolute paths":
262
262
- 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.
767
767
768
768
In order to get caching functionality, enable the Mongoid Query Cache. See the
769
769
section 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 1
1
# frozen_string_literal: true
2
2
3
3
module Mongoid
4
- VERSION = "8.0.5 "
4
+ VERSION = "8.0.6 "
5
5
end
You can’t perform that action at this time.
0 commit comments