You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Love what's been done here, this is just the kind of thing I've been looking for after moving from Java (using the objectify library for Google datastore) into Javascript Node development and finding the implementation a bit bare-bones in the base google-cloud library. The schema and model concepts really make it easy to work with.
The only thing I'd really love to see added is the option of having Promises returned instead of using callbacks (on the relevant such methods), such as the Model methods get, updated, delete etc. It could be added using a different name such as BlogPost.getAsync(1234). I like to make use of async functions and combined with promises it makes things amazingly easy to reason about.
For now I'll have to wrap all the base methods in Promises myself, but would be nice to have it out the box.
The text was updated successfully, but these errors were encountered:
I am currently in a big change professionally, but as soon as I settle I will consider what you comment here. You're right, Promise could be a great feature, I will also consider Generator functions.
Great stuff! Thanks for that! I'll have to take a look into it. Does it change all the default methods to run promises, or are there now optional promise returning methods?
EDIT: Nevermind, I see that the callback is now optional and will return promises if not included. Nice way to go about it.
Hi,
Love what's been done here, this is just the kind of thing I've been looking for after moving from Java (using the objectify library for Google datastore) into Javascript Node development and finding the implementation a bit bare-bones in the base google-cloud library. The schema and model concepts really make it easy to work with.
The only thing I'd really love to see added is the option of having Promises returned instead of using callbacks (on the relevant such methods), such as the Model methods get, updated, delete etc. It could be added using a different name such as
BlogPost.getAsync(1234)
. I like to make use of async functions and combined with promises it makes things amazingly easy to reason about.For now I'll have to wrap all the base methods in Promises myself, but would be nice to have it out the box.
The text was updated successfully, but these errors were encountered: