-
Notifications
You must be signed in to change notification settings - Fork 0
Initial schema #1
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand how graphql
schema works, so I assume this is working (at least you have more skills on that 🎉)
schema.graphql
Outdated
|
||
type Value { | ||
id: ID | ||
value: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ohler55 Those are values stored in database stored as float
t.float(:value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have thought so too. The seed script seemed to use setting an attribute called value with an int. Maybe that is meant to be something else. I did not see a float being set in the seeding though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you know what attributes are in the Postgres tables I'll update based on that. That would be better than inspecting a seeded object after it is created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. In fact, there are stored as double precision
in postgresql (honestly in prefer not to take care of other engines) and considered as Float
in Ruby
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No matter if seeds uses Integer
😛 they are automatically casted before storing in database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed.
I wasn't sure how the various types relate to once another so I followed the Rake seed target. I suspect there is something missing as I did not see any floats which I would expect for values of benchmarks.