Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bitwise Query Operators are not supported in where clause. #1053

Closed
zhangtemplar opened this issue Aug 29, 2017 · 3 comments
Closed

Bitwise Query Operators are not supported in where clause. #1053

zhangtemplar opened this issue Aug 29, 2017 · 3 comments

Comments

@zhangtemplar
Copy link
Contributor

Hi, I have a query like

http://{{ url  }}:{{ port  }}/user?where={"type": {"$bitsAllSet": 16}}

and eve returns

{
	"_error": {
		"message": "Query contains unknown or unsupported operators: $bitsAllSet",
		"code": 400
	},
	"_status": "ERR"
}

The end point is defined as

userSchema = {
    'datasource': {
        'source': 'user',
    },
    'id': {},
    'password': {},
    'name': {},
    'abstract': {},
    'detail': {},
    'title': {},
    'company': {},
    'education': {},
    'website': {},
    'email': {},
    'phone': {},
    'address': {},
    'type': {},
    'capital': {},
    'netCapital': {},
    'creationTime': {},
    'credit': {},
    'logo': {},
}

Any idea?

@Amedeo91
Copy link

Hi,

The operator in not supported. You need to add it to the datalayer in the "operator" attibute of the class Mongo (it is a set). You can do it either by providing a PR to support this functionality or either by extending the Mongo class and pass it to the Eve instace when you instanciate the application.

Regards,
Amedeo

@nicolaiarocci
Copy link
Member

@Amedeo91 thanks for triaging and helping people here. There's also a eve tag on Stack Overflow where people post questions on the framework. Feel free to answer there too if you feel like doing it!

@zhangtemplar
Copy link
Contributor Author

Thanks, @Amedeo91 @nicolaiarocci , I have add a PR for it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants