File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
crates/pgt_statement_splitter/src Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,14 @@ mod tests {
105105 . expect_statements ( vec ! [ "select 1 from contact" , "select 1" ] ) ;
106106 }
107107
108+ #[ test]
109+ fn grant ( ) {
110+ Tester :: from ( "GRANT SELECT ON TABLE \" public\" .\" my_table\" TO \" my_role\" ;" )
111+ . expect_statements ( vec ! [
112+ "GRANT SELECT ON TABLE \" public\" .\" my_table\" TO \" my_role\" ;" ,
113+ ] ) ;
114+ }
115+
108116 #[ test]
109117 fn double_newlines ( ) {
110118 Tester :: from ( "select 1 from contact\n \n select 1\n \n select 3" ) . expect_statements ( vec ! [
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ pub(crate) fn unknown(p: &mut Parser, exclude: &[SyntaxKind]) {
205205 SyntaxKind :: All ,
206206 // for UNION ... EXCEPT
207207 SyntaxKind :: Except ,
208+ // for grant
209+ SyntaxKind :: Grant ,
208210 ]
209211 . iter ( )
210212 . all ( |x| Some ( x) != prev. as_ref ( ) )
@@ -230,6 +232,8 @@ pub(crate) fn unknown(p: &mut Parser, exclude: &[SyntaxKind]) {
230232 SyntaxKind :: Also ,
231233 // for create rule
232234 SyntaxKind :: Instead ,
235+ // for grant
236+ SyntaxKind :: Grant ,
233237 ]
234238 . iter ( )
235239 . all ( |x| Some ( x) != prev. as_ref ( ) )
You can’t perform that action at this time.
0 commit comments