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

is there any feature of aliasing fields and setting defaults value for a field in mongo db while fetching results without aggregations ?

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.4.0
    • None
    • None

    Description

      1) select f1 as field_one from table;
      so f1 is aliased to field_one.

      2) select decode(f1, 1,one, 2, two, 3, three, 'Not a valid range' ) from table.
      so for value of f1 query returns
      1 One
      2 Two
      3 Three
      else
      Not a valid range

      Attachments

        Activity

          People

            Unassigned Unassigned
            ankita_jain90 Delhivery
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: