field static method
Constructs a query for a specific field.
The query
parameter defines the condition for the field.
Example:
var query = DQ.field('name', DQ.like('John')); // { 'name': { '\$regex': 'John', '\$options': 'i' } }
Implementation
static Map<String, Object?> field(String name, Object? query) {
return {
name: query,
};
}