vttranlina commented on code in PR #1849:
URL: https://github.com/apache/james-project/pull/1849#discussion_r1424835727


##########
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresTable.java:
##########
@@ -39,31 +41,60 @@ public interface CreateTableFunction {
 
     @FunctionalInterface
     public interface RequireRowLevelSecurity {
-        PostgresTable supportsRowLevelSecurity(boolean 
rowLevelSecurityEnabled);
+        FinalStage supportsRowLevelSecurity(boolean rowLevelSecurityEnabled);
 
-        default PostgresTable disableRowLevelSecurity() {
+        default FinalStage disableRowLevelSecurity() {
             return supportsRowLevelSecurity(false);
         }
 
-        default PostgresTable supportsRowLevelSecurity() {
+        default FinalStage supportsRowLevelSecurity() {
             return supportsRowLevelSecurity(true);
         }
     }
 
+    public static class FinalStage {
+        private final String tableName;
+        private final boolean supportsRowLevelSecurity;
+        private final Function<DSLContext, DDLQuery> createTableStepFunction;
+        private final ImmutableList.Builder<String> additionalConstraints;

Review Comment:
   https://github.com/apache/james-project/pull/1849#discussion_r1424833536 If 
the PostgresIndex is acceptable, we don't need `additionalConstraints` here. 
   If it is still necessary, We should rename it to -> 
`additionalAlterQueries`, it will be used in same cases that we want to use 
native sql



-- 
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]

Reply via email to