Add IDL number type to basic_types.idl

XMLWordPrintableJSON

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

      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
              Reporter:
              Sara Golemon (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: