Skip to content
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

Object values in postMemberInfo #87

Open
eliasmalik opened this issue May 12, 2018 · 0 comments
Open

Object values in postMemberInfo #87

eliasmalik opened this issue May 12, 2018 · 0 comments

Comments

@eliasmalik
Copy link

eliasmalik commented May 12, 2018

const values = Object.values(githubJson);

Be aware that Object.keys and Object.values return keys and values, respectively, in an arbitrary order. V8 (and therefore Node) return them in insertion order, so you should be fine as long as your input object is constructed with the keys in the order that they're specified in the query, though frankly, this introduces an unnecessary coupling between the function and its calling code.

You can fix this in three ways: either have positional arguments in the postMemberInfo function, or deconstruct the input object, or construct the SQL query string dynamically from the input object. The second option is probably simplest.

@helenzhou6 helenzhou6 added this to the Build Sprint 1 milestone May 14, 2018
@vlbee vlbee removed this from the Build Sprint 1 milestone May 15, 2018
@helenzhou6 helenzhou6 mentioned this issue May 15, 2018
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants