Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5752

Translate Mongoid::Criteria to MQL (similar to AR's to_sql)

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.1.0
    • Affects Version/s: None
    • Component/s: Dev Exp, Query
    • None
    • Ruby Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Similar to ActiveRecord::Relation#to_sql it would be beneficial to be able to translate a the internal representation of a query or aggregation to raw MQL.

      Mongoid::Criteria::Queryable::Selector can "sort of" expose this as the filter criteria can be returned, but other fields passed to the underlying find command (such as sort, skip, limit or projection) wouldn't.

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: