[CDRIVER-2859] Add bson_decimal128_compare function Created: 22/Oct/18  Updated: 26/Apr/23  Resolved: 29/Oct/18

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Derick Rethans Assignee: Derick Rethans
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPC-2209 Make BSON\Value instances comparable Closed
is depended on by PHPC-847 Implement comparison handler for Deci... Closed

 Description   

For the PHP driver we would like to implement a comparison handler for our Decimal128 type, just like we have for ObjectID. libbson has a compare function for the latter (http://mongoc.org/libbson/current/bson_oid_compare.html), but not for bson_decimal128_t.

The CSHARP driver has implemented something similar already: http://mongodb.github.io/mongo-csharp-driver/2.5/apidocs/html/M_MongoDB_Bson_Decimal128_Compare.htm with code at https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Bson/ObjectModel/Decimal128.cs#L1819-L2001


Generated at Wed Feb 07 21:16:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.