bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

operator position #86

Closed bwgjoseph closed 2 years ago

bwgjoseph commented 3 years ago

Hi,

On top of what was mentioned in https://github.com/bwgjoseph/mongoose-vs-ottoman/issues/53#issuecomment-849603597, I think in general, there isn't a place to look at the example of all query operator using ottoman API. All those mentioned in query-builder aren't of much use when not using query.

Some of my confusion now is that when should an operator be in front of the field and when should it not be.

For example

// when using $eq
// <field> then <operator>
.find({
    name : {
        $eq : 'Couchbase Airlines'
    }
}

// when using $in
// <operator> then <field>
.find({
    $in: {
        search_expr: 'model',
        target_expr: ['767-300F']
        }
}

Any way to properly identify where it should be defined?

Thanks

AV25242 commented 3 years ago

Have crated a documentation investigation issue

bwgjoseph commented 2 years ago

This should probably be closed with #87