Improved supported data-types in min() and max()#1200
Merged
mickhansen merged 8 commits intosequelize:masterfrom Jan 5, 2014
xdarklight:master
Merged
Improved supported data-types in min() and max()#1200mickhansen merged 8 commits intosequelize:masterfrom xdarklight:master
mickhansen merged 8 commits intosequelize:masterfrom
xdarklight:master
Conversation
…ared. Also made rawSelect's data-types options more extensible and implemented the "DATE" case.
This gives us the possibility to use "instanceof DECIMAL" when needed.
This should fix min() and max() for postgres.
This fixed query generation (before the column type was always DECIMAL, even if DECIMAL(10,3) was specified).
DECIMAL() and DECIMAL(10,3) are not the same - but the type matches.
Contributor
|
Looks good - I'm going to merge this. |
mickhansen
added a commit
that referenced
this pull request
Jan 5, 2014
Improved supported data-types in min() and max()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I started only numeric types (int and float) were supported.
After my patches 'Date' and 'String' work as well (I added a JUnit test to prove this).
Please carefully review this as I'm not sure if my new "aggregate" function in 1504b6f is good the way it is (and I'm not sure if this should be public API/has to be documented?).
PS: I only tested sqlite so far.