Is there any way I can write (copy-paste) nicely-formatted SQL queries in Java string literals using Eclipse?

前端 未结 7 1536
情深已故
情深已故 2020-12-29 05:43

When I wish to use SQL queries in Java, I usually hold them in final String variables. Now, when the string is too large, it goes out of page breadth, and we either have to

7条回答
  •  无人及你
    2020-12-29 06:06

    I know that I'm late to this party, but for anyone using large queries, the block mode in Eclipse can be very difficult to work with, because it slows way down if you have a query with more than 100 lines or so (depending on your machine).

    I found this site and it is very simple and very fast. Post your code into a window, add a prefix (") and add a suffix (" +) and click save as. It will add the prefix and suffix to each line quite quickly.

    Here's the online tool:

    http://textmechanic.co/Add-Prefix-Suffix-to-Text.html

提交回复
热议问题