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

Make DSLs immutable #7

Open
badgerwithagun opened this issue Jun 10, 2017 · 7 comments
Open

Make DSLs immutable #7

badgerwithagun opened this issue Jun 10, 2017 · 7 comments
Assignees

Comments

@badgerwithagun
Copy link
Member

Currently, most elements of the SQL DSL are mutable. This is one of those things that occurred organically over time to make the DSL read more cleanly, but which has increasingly looked out of place. It also prevents a number of performance optimisations.

All SQL dialect elements need to be made immutable, allowing us to resolve some unpleasant API side-effects. Once this is done, we can significantly improve caching and performance.

This will have widespread binary compatibility issues, and even text API compatibility in some edge cases.

@badgerwithagun
Copy link
Member Author

First stage is available for merge at #43.

Working on the next stage on https://github.com/badgerwithagun/morf/tree/immutable-statements

tsg21 added a commit that referenced this issue Nov 16, 2017
Equals, hashCode and optional immutability in AliasedField implementations (#7)
@badgerwithagun
Copy link
Member Author

Second stage now available for merge in #47.

@badgerwithagun
Copy link
Member Author

After this, we're going to have to start breaking compatibility.

@badgerwithagun
Copy link
Member Author

#47 merged.

badgerwithagun pushed a commit that referenced this issue Apr 18, 2018
…new utility method to respect immutability of a field reference, updated select statement builder to use a new method, and fixed ResultSetIterator to use builder pattern properly.
badgerwithagun pushed a commit that referenced this issue Apr 18, 2018
Replaced statement deepCopy usage with a shallow copy and a builder.
Tidy up the tests to support both immutable and mutable builders.
badgerwithagun pushed a commit that referenced this issue Apr 18, 2018
…new utility method to respect immutability of a field reference, updated select statement builder to use a new method, and fixed ResultSetIterator to use builder pattern properly.
badgerwithagun pushed a commit that referenced this issue Apr 18, 2018
Replaced statement deepCopy usage with a shallow copy and a builder.
Tidy up the tests to support both immutable and mutable builders.
@badgerwithagun
Copy link
Member Author

@pstefaniak7 is currently working on the last steps in making Alfa's internal code compatible with "immutable mode". Once that's done we'll flip the default behaviour around and start removing mutable support.

@therealluigi
Copy link
Contributor

@pstefaniak7 what is the progress on this one? Finished? Abandoned?

@pstefaniak7
Copy link
Contributor

@therealluigi
No progress on this since last update in 2018.

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

3 participants