Yii-mongodb query operators

For mongodb extension

[list=1]

[*]How do I query not equal, lesser/greater than, not in, nor, not?

[*]Is array operators like addToSet, pop, pullAll, pull, push, pushAll supported or will be supported in the future?

[*]How can I extend the Yii2 Mongodb extension

[*]And also, how to write direct query?

[/list]

dump. any advise?

I just received an answer that might help answering your first question.

In my case I was asking how to express the date condition in AR query.

The answer was:


$tweets = Tweet::find()->where(['tweet_time' => ['$lte' => new \MongoDate()]])->all();

So I believe this way you can use any of MongoDB comparison operators

>> 4. And also, how to write direct query?

In Yii’s Mongo Collection object you have a public $mongoCollection variable which is the MongoCollection object (from the native driver, not Yii.) With this object you can create any query you want using the api

Thanks, will try =)