-
Notifications
You must be signed in to change notification settings - Fork 62
Grails 7 #132
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
Conversation
- Updated for Grails 7 - Changed from ExpandoMetaClass to Extension Modules - New coords: `org.grails.plugins:grails-postgresql-extensions` - Re-packaged to `gpc.pgext.*` - Re-organized project
GPC projects should publish to `io.github.gpc`.
| @@ -1,16 +1,16 @@ | |||
| package net.kaleidos.hibernate.criterion.array | |||
| package gpc.pgext.hibernate.criterion.array | |||
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.
Good call!
| } | ||
|
|
||
| PgHstoreOperatorExpression(String propertyName, Map<Object, String> value, String operator) { |
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.
Could these two constructors just be joined into one:
PgHstoreOperatorExpression(String propertyName, Object value, String operator) {
this.propertyName = propertyName
this.value = value as Map<Object, String>
this.operator = operator
}
| static Object[] getValueAsArrayOfType(Object targetValue, Class<?> expectedType, MapFunction mapFunction) { | ||
| Object[] arrValue | ||
| static Object[] getValueAsArrayOfType(Object targetValue, Class expectedType, MapFunction mapFunction) { | ||
| if (targetValue instanceof Object[]) return (Object[]) targetValue |
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.
Add curly brackets like if() {}
| def items = (targetValue instanceof Collection) ? (targetValue as List) : [targetValue] | ||
| def converted = items.collect { o -> | ||
| if (expectedType.isInstance(o)) return o | ||
| if (mapFunction) return mapFunction.map(o) |
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.
return in curly brackets
io.github.gpc:grails-postgresql-extensionsgpc.pgext.*