Improve "sql to java code" feature
See original GitHub issueHi there, When we use copy sql as java code feature in “Choose Format” panel, Java code results something like this:
"select\n" +
"*\n" +
"from\n" +
"table;\n";
May we improve this feature with StringBuilder instead of using “+”?
query.append("select");
query.append("*");
query.append("from");
query.append("table;")
Or may we add customization options in this panel?
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/convert/impl/JavaSQLConverter.java
for (int i = 0; i < sourceLines.length; i++) {
String line = sourceLines[i];
result.append('"').append(CommonUtils.escapeJavaString(line)).append(lineDelimiter).append('"');
if (i < sourceLines.length - 1) {
result.append(" + \n");
} else {
result.append(";");
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
SQL Features and Tuning - jOOQ blog
SQL Features and Tuning · Top SQL Posts · SQL syntax explained · Window functions · JOIN · LATERAL · Arrays, XML, JSON...
Read more >10 Ways to Improve SQL Query Performance - Developer.com
Try to remove cursors from the query and use set-based query; set-based query is more efficient than cursor-based. If there is a need...
Read more >Java Database Performance Tuning - eG Innovations
Learn best practices and tips to tune Java database accesses to enhance the performance of your Java applications.
Read more >11 Tuning PL/SQL Applications for Performance
This chapter shows you how to write efficient PL/SQL code, and speed up ... Some PL/SQL features also help improve the performance of...
Read more >Top 10 SQL Query Optimization Tips to Improve Database ...
Here are the 10 most effective ways to optimize your SQL queries. ... Coding SQL queries in loops slows down the entire sequence....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi there, I’m looking forward to contribute some code to this project, and this issue one seems like an ideal starting point. I’d be happy to take it.
This can be improved by adding extra config options (in additions to existing two options). E.g. “Use StringBuilder”.