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

KEY() not working on GAE Launcher datastore? #102

Open
markdomansky opened this issue Mar 27, 2016 · 1 comment
Open

KEY() not working on GAE Launcher datastore? #102

markdomansky opened this issue Mar 27, 2016 · 1 comment

Comments

@markdomansky
Copy link

I want to do a where clause to return a range of entities (i.e. "select * from metrics where _ _ key _ _ >=KEY(metrics,100) and _ _ key _ _ <= KEY(metrics,200)")

This is the error I get: _ _ key _ _ filter value must be a Key

I've tried simplifying to just "select * from metrics where _ _ key _ _ = KEY(metrics,100)" where I can see in the datastore viewer shows an id = 100.

I saw the other issue that said you can drop an entity right into it, but the full query might not know that an ID=100 exists or ID=200 exists, but there are probably ID=110 or 163.

I've tried with and without apostrophes on both 'metrics' and '100' without success.

Am I doing it wrong? Perhaps I shouldn't even be using ID like this? Perhaps the key in a where clause only be a precise value?

To be fair, I haven't yet tried this on GAE + datastore, should I expect different behavior?

@tomwalder
Copy link
Owner

Hi there,

There are differences in the local system, as it uses a GQL parser I wrote (the local development server does not support GQL natively.

I would certainly try on App Engine and see what it does.

I'll also try and put some time into your specific query.

Tom

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

No branches or pull requests

2 participants