Operators IN, NOT IN, ALL, STARTS_WITH, CONTAINS and BETWEEN in function _mongodb_field_storage_query_value are case sensitive. This seems to be based on documentation of ./include/entity.inc which gives those in upper case.

Looks like that some places like Views are not that strict. Like most SQL databases.

So what do you think? Should we try to get all the places to use upper case or change _mongodb_field_storage_query_value to be case insensitive?

Comments

jiivonen’s picture

Simple patch to make the fix here.

jiivonen’s picture

... and now with content.

misc’s picture

I think that it should be case sensitive, and it should be the query builders that take care about how the queries should be done.
Anyone else have an opinion on this?

kvirta’s picture

Is there a specification somewhere that says, explicitly, that the operators are of certain case? If not, then we really don't have a case to complain to the query builders about it, do we? I couldn't find one anywhere. They just use uppercase operators as example in entity.inc, as jiivonen said.

misc’s picture

@kveirta, I am not talking about a specification, only about that I think about the operators. If users of the module would like to change the case, I am not against it, just telling that I think.

chx’s picture

Assigned: Unassigned » chx

There's no point on insisting case sensitivity IMO. I will fix this.

chx’s picture

Status: Active » Closed (works as designed)

Actually re-reading the issue makes me think there is no use case where lower case is used. The documentation is the doxygen in core entity.inc and that speaks upper case, I know because I wrote that.