Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
3 participants
@zhangtemplar
Copy link
Contributor

zhangtemplar commented Aug 29, 2017

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

This comment has been minimized.

Copy link

Amedeo91 commented Aug 30, 2017

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

This comment has been minimized.

Copy link
Member

nicolaiarocci commented Aug 30, 2017

@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

This comment has been minimized.

Copy link
Contributor Author

zhangtemplar commented Aug 30, 2017

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

nicolaiarocci added a commit that referenced this issue Nov 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.