jmac11 / googlecloudsql

Automatically exported from code.google.com/p/googlecloudsql
0 stars 0 forks source link

Old admin console and Developer Console are showing discrepancy in Datatstore query #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.
In Developer Console query like 
Select * from NameOfTheKind where __key__ = Key('NameOfTheKind', 
xxxxxxxxxxxxxxxx) 
will give a GQL syntax error to remove the quote(" ") 

where as, in Admin console
Select * from NameOfTheKind where __key__ = Key('NameOfTheKind', 
xxxxxxxxxxxxxxxx) 
will return the result

The correct query in developer console is
Select * from NameOfTheKind where __key__ = Key(NameOfTheKind, xxxxxxxxxxxxxxxx)

where as, in Admin console
Select * from NameOfTheKind where __key__ = Key(NameOfTheKind, 
xxxxxxxxxxxxxxxx) 
will return GQL syntax error like Invalid GQL query string  

2.
In Developer console,
When using "Query by Kind" use Filters 
(as there is no way to select the Namespace in "Query by GQL" that is a feature 
for Old Admin console, someone need to use "Query by Kind" to select the 
namespace)

Select "Key" option from the drop-down after they had appeared by Clicking  
"Filters" 

In the Key box (where it is written in blur, Key('Kind0', 'name0'/id0,...))
Write like, 

Key(NameOfTheKind, xxxxxxxxxxxxxxxx)
It will not return anything, 

Follow old admin syntax like
Key('NameOfTheKind', xxxxxxxxxxxxxxxx) 
It will return the result

What is the expected output? What do you see instead?

The syntax should be consistent. Everywhere one consistent query should result 
the same.
For example, in the developer console as 
Select * from NameOfTheKind where __key__ = Key(NameOfTheKind, 
xxxxxxxxxxxxxxxx)   
query works, in "Query using Kind" Key(NameOfTheKind, xxxxxxxxxxxxxxxx) should 
also work and everywhere else Key('NameOfTheKind', Hssxxxxxxxxxxxxxxxx) should 
give syntax error or something.

Or may be the other query with quote should work everywhere and without quote 
should give syntax error.

Original issue reported on code.google.com by ksa...@google.com on 16 Apr 2015 at 2:27

GoogleCodeExporter commented 9 years ago
Pleas discard, as I file it here by mistake. I am filing it the right tracker. 

Original comment by ksa...@google.com on 16 Apr 2015 at 2:44