GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Support `FOR SHARE` by jxnu-liguobin · Pull Request #1922 · JSQLParser/JSqlParser

Conversation

@jxnu-liguobin

@jxnu-liguobin jxnu-liguobin commented Dec 16, 2023

Copy link
Copy Markdown
Contributor

close #1878
MySQL: FOR {UPDATE | SHARE}
PostgreSQL: FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE }

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jxnu-liguobin
feat: Support FOR SHARE
9941105
manticore-projects
manticore-projects requested changes Dec 16, 2023
View reviewed changes

@manticore-projects manticore-projects left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have concerns on this implementation, when building this statement with java code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

jxnu-liguobin added 3 commits December 16, 2023 18:39
@jxnu-liguobin
optimize use way
92597dc
@jxnu-liguobin
optimize use way
6656298
@jxnu-liguobin
fix test
5128258
manticore-projects
manticore-projects reviewed Dec 16, 2023
View reviewed changes
Comment thread src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
[ LOOKAHEAD(<K_FETCH>) fetch = Fetch() { plainSelect.setFetch(fetch); } ]
[ LOOKAHEAD(<K_WITH> <K_ISOLATION>) withIsolation = WithIsolation() { plainSelect.setIsolation(withIsolation); } ]
[ LOOKAHEAD(2) <K_FOR> <K_UPDATE> { plainSelect.setForUpdate(true); }
[ LOOKAHEAD(2)

@manticore-projects manticore-projects Dec 16, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks much better, well done!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
manticore-projects
manticore-projects reviewed Dec 16, 2023
View reviewed changes
Comment thread src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java
}

@Test
public void testIssue1878ViaJava() throws JSQLParserException {

@manticore-projects manticore-projects Dec 16, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jxnu-liguobin
fix param name
e51ec2a
@manticore-projects
manticore-projects self-requested a review December 16, 2023 10:48
manticore-projects
manticore-projects approved these changes Dec 16, 2023
View reviewed changes
@manticore-projects
manticore-projects merged commit 815f875 into JSQLParser:master Dec 16, 2023
@manticore-projects

manticore-projects commented Dec 16, 2023

Copy link
Copy Markdown
Contributor

Thank you a lot for providing this implementation!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@manticore-projects manticore-projects manticore-projects approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[mysql] FOR SHARE

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jxnu-liguobin @manticore-projects
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.