chibenwa commented on code in PR #2296:
URL: https://github.com/apache/james-project/pull/2296#discussion_r1648441376
##########
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresTable.java:
##########
@@ -52,11 +53,58 @@ default FinalStage supportsRowLevelSecurity() {
}
}
+ public abstract static class AdditionalAlterQuery {
+ private String query;
+
+ public AdditionalAlterQuery(String query) {
+ this.query = query;
+ }
+
+ abstract boolean isApplied(boolean rowLevelSecurityEnabled);
Review Comment:
> To change this, I have to refactor code in a lot places.
Not an issue to me.
https://www.teamten.com/lawrence/programming/prefer-enums-over-booleans.html
I'm surprised I need to argue to use strong types.
##########
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresTable.java:
##########
@@ -52,11 +53,58 @@ default FinalStage supportsRowLevelSecurity() {
}
}
+ public abstract static class AdditionalAlterQuery {
+ private String query;
+
+ public AdditionalAlterQuery(String query) {
+ this.query = query;
+ }
+
+ abstract boolean isApplied(boolean rowLevelSecurityEnabled);
Review Comment:
> To change this, I have to refactor code in a lot places.
Not an issue to me.
> I think rowLevelSecurityEnabled is enough to understand
This is subjective.
Rationals:
https://www.teamten.com/lawrence/programming/prefer-enums-over-booleans.html
I'm surprised I need to argue to use strong types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]