Created
August 19, 2016 18:55
-
-
Save xcv58/55a02a4cb2c0730b5c613badf0467d1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Fetch a SQL string from a jOOQ Query in order to manually execute it with another tool. | |
| // For simplicity reasons, we're using the API to construct case-insensitive object references, here. | |
| String sql = create.select(field("BOOK.TITLE"), field("AUTHOR.FIRST_NAME"), field("AUTHOR.LAST_NAME")) | |
| .from(table("BOOK")) | |
| .join(table("AUTHOR")) | |
| .on(field("BOOK.AUTHOR_ID").equal(field("AUTHOR.ID"))) | |
| .where(field("BOOK.PUBLISHED_IN").equal(1948)) | |
| .getSQL(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment