Allow more flexible modes of entering queries, projection fields and sort fields
Allow the user to enter these items without contstructing a valid Javascript object.
Construct query/field/sort objects like this:
- query: 'field1:value1, field2:value2' --> '{field1:value1, field2:value2}'
- query: '55080eeca7c8ee06d61b51b2' --> '{_id:ObjectId('55080eeca7c8ee06d61b51b2')}
- fields: 'field1 field2 -field3' --> {field1:1, field2:1, field3:0}
- sort: 'field1 field2 -field3' --> {field1:1, field2:1, field3:-1}
Introduced Visual Query Builder
-
xodrow commented
Yes, it is tedious to always re-enter those useless {} - the same for _id:
-
Jóhann Geir Jónsson commented
@Michael Wills
Good idea. It would work for the common query object. -
Michael Wills commented
Would something like jsonic help?
-
Jóhann Geir Jónsson commented
Just to clarify: In the examples, a string entered like left of the arrow would be translated to to object on the right of the arrow at query time.