Fixed syntax errors in manual+

This commit is contained in:
lukaseder 2017-05-16 10:52:29 +02:00
parent f363cb0e9e
commit 74bcc17063
5 changed files with 5 additions and 35 deletions

View File

@ -8849,7 +8849,7 @@ Field<String> b = val("b");
Field<String> c = val("c");
// These two produce the same result:
condition("my_column IN ({0}, {1}, {2}), a, b, c); // Using distinct template arguments
condition("my_column IN ({0}, {1}, {2})", a, b, c); // Using distinct template arguments
condition("my_column IN ({0})", list(a, b, c)); // Using a single template argument]]></java><html>
</html></content>
@ -9984,36 +9984,6 @@ public class BindValueAbbreviator extends DefaultVisitListener {
</sections>
</section>
<section id="sql-parser">
<title>SQL Parser</title>
<content><html>
<p>
jOOQ includes a SQL parser API (EXPERIMENTAL in jOOQ 3.9), which allows for parsing a SQL String into a <reference id="queryparts" title="QueryPart"/> of a specified type, including:
</p>
<ul>
<li>A set of <reference class="org.jooq.Queries"/></li>
<li>A single <reference class="org.jooq.Query"/></li>
<li>A <reference class="org.jooq.Table"/></li>
<li>A <reference class="org.jooq.Field"/></li>
<li>A <reference class="org.jooq.Condition"/></li>
</ul>
<p>
The current implementation of the parser is dialect agnostic and will try to parse any SQL dialect into a standard jOOQ expression tree, for instance:
</p>
</html><java><![CDATA[// These two are the same
assertEquals(ctx.select(inline(1)), ctx.parser().parseQuery("select 1"));
assertEquals(ctx.select(inline(1)), ctx.parser().parseQuery("select 1 from dual"));
]]></java><html>
<p>
The value of such an API becomes immediately clear as the parser can consume any type of SQL string (as long as it can be represented using jOOQ API) and the generated expression tree can then be serialised again in any possible way. This can be very helpful when migrating from one database dialect to another, even without really using jOOQ as a database abstraction layer.
</p>
</html></content>
</section>
<section id="scala-sql-building">
<title>SQL building in Scala</title>
<content><html>

View File

@ -8350,7 +8350,7 @@ Field<String> b = val("b");
Field<String> c = val("c");
// These two produce the same result:
condition("my_column IN ({0}, {1}, {2}), a, b, c); // Using distinct template arguments
condition("my_column IN ({0}, {1}, {2})", a, b, c); // Using distinct template arguments
condition("my_column IN ({0})", list(a, b, c)); // Using a single template argument]]></java><html>
</html></content>

View File

@ -8603,7 +8603,7 @@ Field<String> b = val("b");
Field<String> c = val("c");
// These two produce the same result:
condition("my_column IN ({0}, {1}, {2}), a, b, c); // Using distinct template arguments
condition("my_column IN ({0}, {1}, {2})", a, b, c); // Using distinct template arguments
condition("my_column IN ({0})", list(a, b, c)); // Using a single template argument]]></java><html>
</html></content>

View File

@ -8740,7 +8740,7 @@ Field<String> b = val("b");
Field<String> c = val("c");
// These two produce the same result:
condition("my_column IN ({0}, {1}, {2}), a, b, c); // Using distinct template arguments
condition("my_column IN ({0}, {1}, {2})", a, b, c); // Using distinct template arguments
condition("my_column IN ({0})", list(a, b, c)); // Using a single template argument]]></java><html>
</html></content>

View File

@ -8793,7 +8793,7 @@ Field<String> b = val("b");
Field<String> c = val("c");
// These two produce the same result:
condition("my_column IN ({0}, {1}, {2}), a, b, c); // Using distinct template arguments
condition("my_column IN ({0}, {1}, {2})", a, b, c); // Using distinct template arguments
condition("my_column IN ({0})", list(a, b, c)); // Using a single template argument]]></java><html>
</html></content>