Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94954

Add IDL number type to basic_types.idl

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability

      basic_types.idl currently exports safeInt/safeInt64 types for numbers, and the latter two can accept either BSON int or BSON long values during parse, but when serializing, they explicitly store a single given type (int for safeInt or int64_t for safeInt64).

      Some commands such as count want to serialize as a BSON int when the value can fit into int32_t, or a BSON long when the value is larger.  A standard IDL type which uses the BSONObjBuilder::appendNumber overload to select the encoded type based on value would simplify TypedCommand reply structures.

            Assignee:
            Unassigned Unassigned
            Reporter:
            sara.golemon@mongodb.com Sara Golemon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: