Add AsFloat64() and AsFloat64OK() method to RawValue

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      In GODRIVER-3518, we modified the $$lte operator test to accept doubles. We changed it to convert values (from int64/int32/double) to float64 rather than int64 for comparisons between numeric values with different BSON types.

      Definition of done

      Similar to how AsInt64() converts to int64, we should add a method AsFloat64() to RawValue to convert to float64.
      Similar to how AsInt64OK() converts to int64, we should add a method AsFloat64OK() to RawValue to convert to float64.

      Use the new methods in the $$lte logic of the unified test runner.

      Pitfalls

      What should the implementer watch out for? What are the risks?

            Assignee:
            Rafael Cenzano
            Reporter:
            Selena Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: