From 0af655949cd2bc5d2be40f50a38e718cdc238726 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Fri, 24 Aug 2012 13:57:32 +0200 Subject: [PATCH] [#1657] Reorganise the manual (139 / 176) --- .../src/main/resources/manual-2.5.xml | 95 +++++++++++++++++-- 1 file changed, 88 insertions(+), 7 deletions(-) diff --git a/jOOQ-website/src/main/resources/manual-2.5.xml b/jOOQ-website/src/main/resources/manual-2.5.xml index e52f1fb09f..415888c5af 100644 --- a/jOOQ-website/src/main/resources/manual-2.5.xml +++ b/jOOQ-website/src/main/resources/manual-2.5.xml @@ -4424,21 +4424,102 @@ create.select()
SQL injection and plain SQL QueryParts - + +

SQL injection and plain SQL QueryParts

+

+ Special care needs to be taken when using . While jOOQ's API allows you to specify bind values for use with plain SQL, you're not forced to do that. For instance, both of the following queries will lead to the same, valid result: +

+ + + +

+ All methods in the jOOQ API that allow for plain (unescaped, untreated) SQL contain a warning message in their relevant Javadoc, to remind you of the risk of SQL injection in what is otherwise a SQL-injection-safe API. +

+
QueryParts - + +

Everything is a QueryPart

+

+ A and all its contained objects is a . QueryParts essentially provide this functionality: +

+
    +
  • they can using the method
  • +
  • they can using the method
  • +
+ +

+ Both of these methods are contained in jOOQ's internal API's , which is internally implemented by every QueryPart. QueryPart internals are best illustrated with an example. +

+ +

Example: CompareCondition

+

+ A simple example can be provided by checking out jOOQ's internal representation of a (simplified) . It is used for any comparing two fields as for example the T_AUTHOR.ID = T_BOOK.AUTHOR_ID condition here: +

+-- [...] +FROM T_AUTHOR +JOIN T_BOOK ON T_AUTHOR.ID = T_BOOK.AUTHOR_ID +-- [...] + +

+ This is how jOOQ implements such a condition: +

+ + + +

+ The following sections explain some more details about and , as well as other implementation details about QueryParts in general. +

+
-
- jOOQ architecture - -
-
SQL rendering