Skip to content

Request for feature to filter primitive values with either OR or NOT #1924

Description

@angadn

I'm attempting to build a MongoDB-to-Datastore proxy. It must be stateless and Dockerized, so that I can scale it easily vertically. To do this, I've decided to base my work off https://github.com/Cordazar/crest

I faced 2 challenges:

  • Lack of support for a Not-Equal filter - I have decided to make do by proxying it for two inequalities (A != B is equivalent to A < B OR A > B)
  • Lack of support for a Not-In filter - I have decided to use an inequalities approach again since it seems to apply it against all individual elements

The one I'm unable to plan for is the lack of support for OR queries. Will my proxy have no way of expressing these in NodeJS? When is functionality for this planned for release with the Node lib? (I was unable to find any open discussions on the same on the GitHub issues)

I can make multiple queries but this will make the internal workings of my proxy rather complex, and I'd really be happy to avoid it if possible. Mathematically speaking, the only option is a standard De-morgan transform, ie. using AND(NE(A), NE(B)) = OR(A, B). This is impossible to implement if at the primitive level, we don't have both OR, as well as NOT.

Lastly, am I trying to reinvent the wheel and is it possible that something similar to what I'm attempting to build is already available?

Thanks,
Angad

Activity

  1. stephenplusplus commented on Jan 19, 2017

    @stephenplusplus
    Contributor
  2. stephenplusplus commented on Feb 16, 2017

    @stephenplusplus
    Contributor

    Related issues: #1376 #1986

    Please track this request on the datastore repo: googleapis/google-cloud-datastore#36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions