New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plsql] Support for SELECT INTO #1279

Merged
merged 19 commits into from Sep 25, 2018

Conversation

Projects
None yet
3 participants
@adangel
Member

adangel commented Aug 3, 2018

This adds basic support for SELECT INTO statements.

This implementation is probably incomplete but we can parse successfully even a bit more complex statements. Further refinements will be done with additional PRs.

@adangel adangel added the is:WIP label Aug 3, 2018

@pmd-test

This comment has been minimized.

pmd-test commented Sep 10, 2018

1 Message
📖 No java rules are changed!

Generated by 🚫 Danger

@adangel adangel added this to the 6.8.0 milestone Sep 11, 2018

@adangel adangel requested a review from jsotuyod Sep 11, 2018

@adangel adangel removed the is:WIP label Sep 11, 2018

@jsotuyod

Other than that, this looks awesome

( IntoClause() | BulkCollectIntoClause() )
RestOfStatement()

{ return jjtThis; }

This comment has been minimized.

@jsotuyod

jsotuyod Sep 22, 2018

Member

is this actually needed? I see it over and over but I don't recall we needing it in other grammars such as Java

This comment has been minimized.

@adangel

adangel Sep 24, 2018

Member

Yes, I've seen this. I didn't change it for now and just added it for the new nodes, too.

You can see one usage here:

"(" {sb.append("(");}
[ simpleNode = FormalParameter() { sb.append(simpleNode.getImage());}
( "," simpleNode = FormalParameter() { sb.append(","+simpleNode.getImage());} )*
]
")"{sb.append(")");}

There are many places, where the child node is captured and the image string is built which produces again a string representation of the current AST part...
I guess, it's more like a convenience for developing/debugging, since you can look at the "image" of a node to see, what this is, without the need to know the AST structure/node names.

@jsotuyod jsotuyod merged commit 12b731f into pmd:master Sep 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@adangel adangel deleted the adangel:plsql-sql-statements branch Sep 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment