Skip to content

@google-cloud/datastore: v0.5.0 vs v.0.1.1 #1786

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

Closed
saurabh2590 opened this issue Nov 13, 2016 · 1 comment
Closed

@google-cloud/datastore: v0.5.0 vs v.0.1.1 #1786

saurabh2590 opened this issue Nov 13, 2016 · 1 comment
Assignees
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.

Comments

@saurabh2590
Copy link

I was using @google-cloud/datastore with version 0.1.1.
When I use the following code.

var DB = require('@google-cloud/datastore')(
  {
    projectId : 'archives-1235',
    keyFilename : 'key_file_path'
  }
);

var query = DB.createQuery('User');
    var key = DB.key('User');
    DB.runQuery(query.filter('email','[email protected]'), function(err,data){
      console.log(err);
      console.log(data);
    });

I get the proper expected response as:

[ { key: 
     Key {
       namespace: undefined,
       id: 5630110493310976,
       kind: 'User',
       path: [Getter] },
    data: { email: '[email protected]', name: 'saurabh', password: 'adasd' } },
  { key: 
     Key {
       namespace: undefined,
       id: 5717424225648640,
       kind: 'User',
       path: [Getter] },
    data: { email: '[email protected]', name: 'saurabh', password: 'adasd' } } ]

However, when I updated my module version to v.0.5.0, for the same code, response returned is as follow and it doesn't match with the documenation provided.

[ { email: '[email protected]', name: 'saurabh', password: 'adasd' },
  { email: '[email protected]', name: 'saurabh', password: 'adasd' } ]

Definitely, there is something changed in the in the newer version and causing issues.

@stephenplusplus stephenplusplus added api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue. labels Nov 13, 2016
@stephenplusplus
Copy link
Contributor

stephenplusplus commented Nov 13, 2016

Yes, we made a change and we're almost ready to cut a release which will update the places we missed in the docs. Please see #1768.

Sorry for the confusion. For now, please see the master docs for google-cloud/datastore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants