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 ?

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.4.0
    • Component/s: None
    • None
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      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

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

              Created:
              Updated:
              Resolved: