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
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

@zhangtemplar 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
Copy link

@Amedeo91 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

Loading

@nicolaiarocci
Copy link
Member

@nicolaiarocci 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!

Loading

@zhangtemplar
Copy link
Contributor Author

@zhangtemplar zhangtemplar commented Aug 30, 2017

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants