-
Notifications
You must be signed in to change notification settings - Fork 120
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
Human Readable Database Results #300
Comments
Not quite sure what you're asking, are you wondering about the terminal and how to see/inspect data there? To do that there is a helper function What do you suggest? Should there be a more robust database-like (mysql-like perhaps) set of helpers for visualizing the data something like this: Two things actually. First, there should probably be a
|
Regarding MySQL, I've found MongoHub (Mac) can help to visualize the data if you click the 'Query' icon. With the database console idea, this sounds really useful. I'm currently using something like this to reset my DB, but not to inspect:
|
To loop through the results what I usually do is something like: App.User.all (err, users) =>
App.User.count (err, count) =>
for num in [0...count]
user = users.objectAt(num)
console.log user.toJSON() #this will show you just the user object and it's properties.
# do something to user It's slightly awkward, but a small price to pay for the conveniences Ember brings. |
Cool! This could be quite powerful... |
When querying Mongo from the Controller we get back quite a big soup of variables, which e_dub mentioned in IRC are for Ember integration.
As a new user I found this confusing, expecting to get the results themselves. I'm sure they're in there but I can't see them in the console as there are too many lines for the terminal window to keep track of.
e_dub suggested using this to get the first object:
But for example, how would I loop through each result? Seeing a simple array of results would allow users to visualize the data set much easier. Do we need a "dataFilter()" function?
The text was updated successfully, but these errors were encountered: