Skip to content

Commit

Permalink
MOD: 修改细节问题
Browse files Browse the repository at this point in the history
  • Loading branch information
stalary authored and idglirongqian committed May 6, 2022
1 parent 06b56c9 commit 5b411ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 80 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/*
Create policy statement
syntax:
CREATE ROW POLICY [IF NOT EXISTS] test_row_policy ON test_table AS {PERMISSIVE|RESTRICTIVE} TO admin USING (a = ’xxx‘)
CREATE ROW POLICY [IF NOT EXISTS] test_row_policy ON test_table AS {PERMISSIVE|RESTRICTIVE} TO user USING (a = ’xxx‘)
*/
public class CreatePolicyStmt extends DdlStmt {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/*
Drop policy statement
syntax:
DROP [ROW] POLICY [IF EXISTS] test_row_policy ON test_table
DROP [ROW] POLICY [IF EXISTS] test_row_policy ON test_table [FOR user]
*/
@AllArgsConstructor
public class DropPolicyStmt extends DdlStmt {
Expand Down Expand Up @@ -71,7 +71,9 @@ public String toSql() {
sb.append("IF EXISTS ");
}
sb.append(policyName).append(" ON ").append(tableName.toSql());
sb.append(" TO ").append(user.getQualifiedUser());
if (user != null) {
sb.append(" FOR ").append(user.getQualifiedUser());
}
return sb.toString();
}
}

0 comments on commit 5b411ae

Please sign in to comment.