question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preserve keyword case

See original GitHub issue

Some users prefer that the original case of SQL keywords be preserved, for example: System.out.println(CCJSqlParserUtil.parseStatements("select * from sysdatabases").toString());

Desired behavior: Optionally (or by some other means) preserve keyword case, for example print: select * from sysdatabases

System: JSqlParser version 3.1 (latest) Java 8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wumpzcommented, Feb 2, 2020

So may we close this one?

Additionally, you have the original SQL. There the case is not attached.

As I said, the deparsers could be changed in a way, to make some case changes on used keywords.

This could be the start of some pretty printing stuff within the deparsers.

1reaction
wumpzcommented, Dec 4, 2019

I don’t think, the request you filed at javacc will have any influence on this. The grammar of JSqlParser itself uses this tokens and build an object hierarchy from this. The case of object names is preserved, but when you use a toString or a deparser, the keywords do not come from the accepted tokens, but from string constants like “SELECT”.

One solution here would be to write or adapt the deparsers to be able to use upper case or lower case keywords.

You could file a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Preserve Keyword - Code Snippets - Visual Basic Planet
The Preserve keyword indicates that the data stored in the array prior to redimensioning should be transferred to the newly created array. If...
Read more >
ReDim statement (VBA) - Microsoft Learn
Keyword used to preserve the data in an existing array when you change the size of the last dimension. varname, Required. Name of...
Read more >
Use this extension to preserve case when using ... - TikTok
1.4K Likes, 22 Comments. TikTok video from Visual Studio Code (@vscode): "Use this extension to preserve case when using multiple cursors!
Read more >
Keyword Case · Unibeautify
Keyword Case ; Config Key: keyword_case ; Description: Case type for keywords ; Available since version: 0.17.0 (Current: npm ) ; Type: string...
Read more >
Use More Case Keywords to Find Articles - Salesforce Help
Use More Case Keywords to Find Articles. When searching articles from a case, by default, only the case title is used in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found