File tree Expand file tree Collapse file tree
crates/postgresql-cst-parser/src/tree_sitter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,7 +193,8 @@ fn walk_and_build(
193193 | SyntaxKind :: select_clause
194194 | SyntaxKind :: opt_select_limit
195195 | SyntaxKind :: opt_target_list
196- | SyntaxKind :: opt_sort_clause => {
196+ | SyntaxKind :: opt_sort_clause
197+ | SyntaxKind :: select_limit => {
197198 // [Node: Removal]
198199 //
199200 // Ignore current node, and continue building its children.
@@ -301,6 +302,16 @@ FROM
301302 let ( new_root, _) = get_ts_tree_and_range_map ( input, & root) ;
302303 assert_not_exists ( & new_root, SyntaxKind :: opt_sort_clause) ;
303304 }
305+
306+ #[ test]
307+ fn no_select_limit ( ) {
308+ let input = "select a from t limit 5;" ;
309+ let root = cst:: parse ( input) . unwrap ( ) ;
310+ assert_exists ( & root, SyntaxKind :: select_limit) ;
311+
312+ let ( new_root, _) = get_ts_tree_and_range_map ( input, & root) ;
313+ assert_not_exists ( & new_root, SyntaxKind :: select_limit) ;
314+ }
304315 }
305316
306317 mod flatten {
You can’t perform that action at this time.
0 commit comments