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

.Indexes output should be consistent #82

Closed
Etomyutikos opened this issue Nov 28, 2017 · 0 comments · Fixed by #83
Closed

.Indexes output should be consistent #82

Etomyutikos opened this issue Nov 28, 2017 · 0 comments · Fixed by #83

Comments

@Etomyutikos
Copy link
Member

The .Indexes field on the Table struct in the templates has an inconsistent order. This is due, most likely, to using a map instead of a slice in database/drivers/*/parse.go. The database returns the rows in a consistent order.

It will also prevent regeneration of files from triggering diffs if there's no actual change in the data.

Etomyutikos pushed a commit to codercom/gnorm that referenced this issue Nov 28, 2017
fixes gnormal#82

The databases return index data in a consistent order. The previous
process did not respect that through its use of a map as an
intermediate store. By using slices, we now guarantee that the template
will see the indexes in the order the database returned them.
natefinch pushed a commit that referenced this issue Dec 13, 2017
* ensure consistent index ordering

fixes #82

The databases return index data in a consistent order. The previous
process did not respect that through its use of a map as an
intermediate store. By using slices, we now guarantee that the template
will see the indexes in the order the database returned them.

* pluralize tableIndex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant