[#7906] Add support for H2 window functions - Support also GROUPS and EXCLUDE

This commit is contained in:
lukaseder 2018-10-02 10:41:50 +02:00
parent de5241b4af
commit 3d1d17ec7d
22 changed files with 378 additions and 942 deletions

View File

@ -124,7 +124,7 @@ renameStatement = 'RENAME'
| 'INDEX' indexName 'TO' indexName
| 'SCHEMA' schemaName 'TO' schemaName
| 'SEQUENCE' sequenceName 'TO' sequenceName
| 'VIEW' tableName 'TO' tableName
| 'VIEW' tabelName 'TO' tableName
| [ 'TABLE' ] tableName 'TO' tableName
)
;

View File

@ -158,7 +158,7 @@ renameStatement = 'RENAME'
| 'INDEX' indexName ( 'TO' | 'AS' ) indexName
| 'SCHEMA' schemaName ( 'TO' | 'AS' ) schemaName
| 'SEQUENCE' sequenceName ( 'TO' | 'AS' ) sequenceName
| 'VIEW' tableName ( 'TO' | 'AS' ) tableName
| 'VIEW' tabelName ( 'TO' | 'AS' ) tableName
| [ 'TABLE' ] tableName ( 'TO' | 'AS' ) tableName
)
;

View File

@ -15,13 +15,11 @@ ddlStatement =
| alterViewStatement
| commentStatement
| createTableStatement
| createTypeStatement
| createIndexStatement
| createSchemaStatement
| createSequenceStatement
| createViewStatement
| dropTableStatement
| dropTypeStatement
| dropIndexStatement
| dropViewStatement
| dropSequenceStatement
@ -63,16 +61,11 @@ alterTableStatement = 'ALTER TABLE' [ 'IF EXISTS' ] tableName break
| 'ADD' [ 'COLUMN' ] column
| 'ADD' '(' ( 'CONSTRAINT' constraintName constraint | constraint | column )
{ ',' ( 'CONSTRAINT' constraintName constraint | constraint | column ) } ')'
| ( 'ALTER' | 'MODIFY' )
( [ 'COLUMN' ] identifier
(
[ [ 'SET DATA' ] 'TYPE' ] dataType [ [ 'NOT' ] 'NULL' ]
| ( 'SET' | 'DROP' ) 'NOT NULL'
| [ 'NOT' ] 'NULL'
| [ 'RENAME' ] ( 'TO' | 'AS' ) identifier
)
| column
| '(' column ')'
| ( 'ALTER' | 'MODIFY' ) [ 'COLUMN' ] identifier
(
[ [ 'SET DATA' ] 'TYPE' ] dataType [ [ 'NOT' ] 'NULL' ]
| ( 'SET' | 'DROP' ) 'NOT NULL'
| [ 'RENAME' ] ( 'TO' | 'AS' ) identifier
)
| 'COMMENT' [ '=' ] stringLiteral
| 'DROP' [ 'COLUMN' ] identifier [ 'CASCADE' | 'RESTRICT' ]
@ -128,11 +121,8 @@ break
[ 'COMMENT' [ '=' ] stringLiteral ]
;
createTypeStatement = 'CREATE TYPE' typeName 'AS ENUM' '(' [ stringLiteral { ',' stringLiteral } ] ')'
;
createIndexStatement = 'CREATE' [ 'UNIQUE' ] 'INDEX' [ 'IF NOT EXISTS' ] [ indexName ] break
'ON' tableName [ 'USING' 'BTREE' ] '(' sortFields ')'
'ON' tableName '(' sortFields ')'
[ 'INCLUDE' '(' identifiers ')' ]
[ 'WHERE' condition ]
;
@ -141,12 +131,6 @@ createSchemaStatement = 'CREATE SCHEMA' [ 'IF NOT EXISTS' ] schemaName
;
createSequenceStatement = 'CREATE' ( 'SEQUENCE' | 'GENERATOR' ) [ 'IF NOT EXISTS' ] sequenceName
[ START [ WITH ] signedInteger ]
[ INCREMENT [ BY ] signedInteger ]
[ MINVALUE signedInteger | NO MINVALUE ]
[ MAXVALUE signedInteger | NO MAXVALUE ]
[ CYCLE | NO CYCLE ]
[ CACHE unsignedInteger | NO CACHE ]
;
createViewStatement = 'CREATE' [ 'OR' ( 'ALTER' | 'REPLACE') ] 'VIEW' [ 'IF NOT EXISTS' ] tableName
@ -156,9 +140,6 @@ createViewStatement = 'CREATE' [ 'OR' ( 'ALTER' | 'REPLACE') ] 'VIEW' [ 'IF NOT
dropTableStatement = 'DROP' [ 'TEMPORARY' ] 'TABLE' [ 'IF EXISTS' ] tableName [ 'CASCADE' | 'RESTRICT' ]
;
dropTypeStatement = 'DROP TYPE' [ 'IF EXISTS' ] typeName { ',' typeName } [ 'CASCADE' | 'RESTRICT' ]
;
dropIndexStatement = 'DROP INDEX' [ 'IF EXISTS' ] indexName [ 'ON' tableName ]
;
@ -177,7 +158,7 @@ renameStatement = 'RENAME'
| 'INDEX' indexName ( 'TO' | 'AS' ) indexName
| 'SCHEMA' schemaName ( 'TO' | 'AS' ) schemaName
| 'SEQUENCE' sequenceName ( 'TO' | 'AS' ) sequenceName
| 'VIEW' tableName ( 'TO' | 'AS' ) tableName
| 'VIEW' tabelName ( 'TO' | 'AS' ) tableName
| [ 'TABLE' ] tableName ( 'TO' | 'AS' ) tableName
)
;
@ -244,12 +225,9 @@ values = 'VALUES' '(' fields ')' { ',' '(' fields ')' }
updateStatement =
[ with ]
( 'UPDATE' | 'UPD' ) tableName [ [ 'AS' ] identifier ]
( 'UPDATE' | 'UPD' ) tableName
'SET' setClauses
[ 'FROM' tables ]
[ 'WHERE' condition ]
[ 'ORDER BY' sortFields ]
[ 'LIMIT' unsignedInteger ]
[ 'RETURNING' ( '*' | fields ) ]
;
@ -263,8 +241,6 @@ deleteStatement =
[ with ]
( 'DELETE' | 'DEL' ) [ 'FROM' ] tableName
[ 'WHERE' condition ]
[ 'ORDER BY' sortFields ]
[ 'LIMIT' unsignedInteger ]
[ 'RETURNING' ( '*' | fields ) ]
;
@ -647,30 +623,24 @@ term =
| 'COUNT' '(' ( '*' | [ 'DISTINCT' | 'ALL' ] field ) ')' [ keep | filter ] [ over ]
| 'CUME_DIST' ( '(' ')' over | '(' fields ')' withinGroup )
| 'CURRVAL' '(' ( name | stringLiteral ) ')'
| ( 'CURRENT' 'DATE' | 'CURRENT_DATE' ) [ '(' ')' ]
| ( 'CURRENT' 'SCHEMA' | 'CURRENT_SCHEMA' ) [ '(' ')' ]
| ( 'CURRENT' 'TIME' | 'CURRENT_TIME' ) [ '(' ')' ]
| ( 'CURRENT' 'TIMESTAMP' | 'CURRENT_TIMESTAMP' ) [ '(' ')' ]
| ( 'CURRENT' 'USER' | 'CURRENT_USER' ) [ '(' ')' ]
| 'CURDATE' '(' ')'
| 'CURTIME' '(' ')'
| 'CURRENT_DATE'
| 'CURRENT_SCHEMA'
| 'CURRENT_TIME'
| 'CURRENT_TIMESTAMP'
| 'CURRENT_USER'
| dateLiteral
| 'DATEADD' '(' datePart ',' field ',' field ')'
| 'DATEDIFF' '(' [ datePart ',' ] field ',' field ')'
| 'DATE_TRUNC' '(' stringLiteral ',' field ')'
| 'DAY' '(' field ')'
| 'DAYOFMONTH' '(' field ')'
| 'DAYOFWEEK' '(' field ')'
| 'DECODE' '(' field ',' field ',' field { ',' field } ')'
| 'DENSE_RANK' ( '(' ')' over | '(' fields ')' withinGroup )
| ( 'DEG' | 'DEGREE' | 'DEGREES' ) '(' sum ')'
| 'EPOCH' '(' field ')'
| 'EXTRACT' '(' datePart 'FROM' field ')'
| 'EXP' '(' sum ')'
| 'EVERY' '(' field ')' [ filter ] [ over ]
| 'FLOOR' '(' sum ')'
| 'FIELD' '(' field ',' field { ',' field } ')'
| 'FIRST_VALUE' '(' field [ 'RESPECT NULLS' | 'IGNORE NULLS' ] ')' over
| 'FIRST_VALUE' '(' field ')' over
| 'GETDATE' '(' ')'
| 'GREATEST' '(' fields ')'
| 'GROUP_CONCAT' '(' [ 'DISTINCT' ] field [ 'ORDER BY' sortFields ] [ 'SEPARATOR' stringLiteral ] ')'
@ -693,9 +663,9 @@ term =
| 'LOG' '(' sum ',' unsignedInteger ')'
| 'LEVEL'
| 'LEAST' '(' fields ')'
| 'LEAD' '(' field [ ',' unsignedInteger [ ',' field ] ] [ 'RESPECT NULLS' | 'IGNORE NULLS' ] ')' over
| 'LAG' '(' field [ ',' unsignedInteger [ ',' field ] ] [ 'RESPECT NULLS' | 'IGNORE NULLS' ] ')' over
| 'LAST_VALUE' '(' field [ 'RESPECT NULLS' | 'IGNORE NULLS' ] ')' over
| 'LEAD' '(' field [ ',' unsignedInteger [ ',' field ] ] ')' over
| 'LAG' '(' field [ ',' unsignedInteger [ ',' field ] ] ')' over
| 'LAST_VALUE' '(' field ')' over
| 'LISTAGG' '(' field [ ',' stringLiteral ] ')' withinGroup [ over ]
| 'MIN' '(' [ 'DISTINCT' | 'ALL' ] field ')' [ keep | filter ] [ over ]
| 'MAX' '(' [ 'DISTINCT' | 'ALL' ] field ')' [ keep | filter ] [ over ]
@ -710,7 +680,7 @@ term =
| 'NVL2' '(' field ',' field ',' field ')'
| 'NULLIF' '(' field ',' field ')'
| 'NTILE' '(' unsignedInteger ')' over
| 'NTH_VALUE' '(' field ',' unsignedInteger [ 'FROM FIRST' | 'FROM LAST' ] [ 'RESPECT NULLS' | 'IGNORE NULLS' ] ')' over
| 'NTH_VALUE' '(' field ',' unsignedInteger ')' over
| 'NEXT VALUE FOR' sequenceName
| 'NEXTVAL' '(' ( name | stringLiteral ) ')'
| 'OCTET_LENGTH' '(' field ')'
@ -720,8 +690,6 @@ term =
| ( 'PERCENTILE_CONT' | 'PERCENTILE_DISC' ) '(' unsignedNumericLiteral ')' withinGroup [ over ]
| ( 'POW' | 'POWER' ) '(' field ',' field ')'
| 'PRIOR' concat
| 'PRODUCT' '(' [ 'DISTINCT' | 'ALL' ] field ')' [ keep | filter ] [ over ]
| 'QUARTER' '(' field ')'
| (
'REGR_SLOPE'
| 'REGR_INTERCEPT'
@ -758,7 +726,7 @@ term =
| 'STDDEV_SAMP' '(' field ')' [ over ]
| 'STR_REPLACE' '(' field ',' field ',' field ')'
| 'SUBSTRING' '(' field 'FROM' sum [ 'FOR' sum ] ')'
| 'SUM' '(' [ 'DISTINCT' | 'ALL' ] field ')' [ keep | filter ] [ over ]
| 'SUM' '(' [ 'DISTINCT' | 'ALL' ] field ')' [ keep | filter ]
| 'TAN' '(' sum ')'
| 'TANH' '(' sum ')'
| timeLiteral
@ -772,7 +740,6 @@ term =
| 'TRUNC' '(' field ',' stringLiteral ')'
| 'TRUNC' '(' sum ',' sum ')'
| truthValue
| 'UNIX_TIMESTAMP' '(' field ')'
| ( 'UPPER' | 'UCASE' ) '(' field ')'
| 'VAR_POP' '(' field ')' [ over ]
| 'VAR_SAMP' '(' field ')' [ over ]
@ -792,22 +759,7 @@ term =
truthValue = 'TRUE' | 'FALSE' | 'NULL'
;
datePart =
( 'YEAR' | 'YYYY' | 'YY' )
| ( 'MONTH' | 'MM' | 'M' )
| ( 'DAY' | 'DD' | 'D' )
| ( 'HOUR' | 'HH' )
| ( 'MINUTE' | 'MI' | 'N' )
| ( 'SECOND' | 'SS' | 'S' )
| ( 'MILLISECOND' | 'MS' )
| ( 'MICROSECOND' | 'MCS' )
| ( 'NANOSECOND' | 'NS' )
| 'EPOCH'
| ( 'QUARTER' | 'QQ' | 'Q' )
| ( 'WEEK ' | 'WW' | 'WK' )
| ( 'ISO_DAY_OF_WEEK' | 'ISODOW' )
| ( 'DAY_OF_WEEK' | 'DAYOFWEEK' | 'WEEKDAY' | 'W' )
| ( 'DAY_OF_YEAR' | 'DAYOFYEAR' | 'DOY' | 'DY' | 'Y')
datePart = 'YEAR' | 'MONTH' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND'
;
keep = 'KEEP' '(' 'DENSE_RANK' ( 'FIRST' | 'LAST' ) 'ORDER BY' sortFields ')'
@ -868,7 +820,7 @@ dataType =
| 'CHARACTER' [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| 'CLOB' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'DATE'
| 'DECIMAL' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'DECIMAL' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'DOUBLE' [ 'PRECISION' ] [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'ENUM' '(' stringLiteral [ ',' stringLiteral ] ')' [ 'COLLATE' collationName ]
| 'FLOAT' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
@ -884,8 +836,8 @@ dataType =
| 'MEDIUMTEXT' [ 'COLLATE' collationName ]
| 'NCHAR' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'NCLOB' [ 'COLLATE' collationName ]
| 'NUMBER' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'NUMERIC' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'NUMBER' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'NUMERIC' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'NVARCHAR' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'OTHER'
| 'REAL' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
@ -925,9 +877,6 @@ schemaName = name
tableName = name
;
typeName = name
;
indexName = name
;
@ -975,19 +924,7 @@ timeLiteral = 'TIME' stringLiteral
timestampLiteral = 'TIMESTAMP' stringLiteral
;
intervalLiteral =
'INTERVAL' stringLiteral
| field
(
( 'YEAR' | 'YEARS' )
| ( 'MONTH' | 'MONTHS' )
| ( 'DAY' | 'DAYS' )
| ( 'HOUR' | 'HOURS' )
| ( 'MINUTE' | 'MINUTES' )
| ( 'SECOND' | 'SECONDS' )
| ( 'MILLISECOND' | 'MILLISECONDS' )
| ( 'MICROSECOND' | 'MICROSECONDS' )
)
intervalLiteral = 'INTERVAL' stringLiteral
;
signedInteger = todo

View File

@ -195,12 +195,12 @@ function printContent() {
</xsl:template>
<xsl:template match="section" mode="navigation">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<table cellpadding="0" cellspacing="0" border="0" width="936">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="." mode="breadcrumb"/>
</td>
<td align="right" valign="top" style="white-space: nowrap; text-align: right">
<td align="right" valign="top" style="white-space: nowrap">
<xsl:apply-templates select="." mode="prev-next"/>
</td>
</tr>

View File

@ -466,26 +466,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -3945,8 +3944,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -6370,8 +6368,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -564,26 +564,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -4934,8 +4933,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -7813,8 +7811,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -564,26 +564,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -5332,8 +5331,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -8402,8 +8400,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -627,26 +627,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -8277,8 +8276,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10275,11 +10273,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -11931,10 +11927,6 @@ for (BookRecord book : create.selectFrom(BOOK).fetch()) {
}
}]]></java><html>
<p>
If you're using <reference id="codegen-database-forced-types" title="forcedTypes"/> in your code generation configuration, you can configure the application of an <code>EnumConverter</code> by adding <code>&lt;enumConverter&gt;true&lt;/enumConverter&gt;</code> to your <code>&lt;forcedType/&gt;</code> configuration.
</p>
<h3>Using Converters in generated source code</h3>
<p>
jOOQ also allows for generated source code to reference your own custom converters, in order to permanently replace a <reference id="table-columns" title="table column's"/> &lt;T&gt; type by your own, custom &lt;U&gt; type. See the manual's section about <reference id="custom-data-types" title="custom data types"/> for details.
@ -12275,8 +12267,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -15081,7 +15072,7 @@ result.forEach((Object[] entities) -> {
<li><code>org.jooq.util.oracle.OracleDatabase</code></li>
<li><code>org.jooq.util.postgres.PostgresDatabase</code></li>
<li><code>org.jooq.util.redshift.RedshiftDatabase</code></li>
<li><code>org.jooq.util.sqlite.SQLiteDatabase</code></li>
<li><code>org.jooq.util.sqlite.SQLiteDatabaes</code></li>
<li><code>org.jooq.util.sqlserver.SQLServerDatabase</code></li>
<li><code>org.jooq.util.sybase.SybaseDatabase</code></li>
<li><code>org.jooq.util.vertica.VerticaDatabase</code></li>
@ -16313,138 +16304,6 @@ public class CaseInsensitiveOrderProvider implements Comparator<Definition> {
For more information about using converters, <reference id="custom-data-types" title="please refer to the manual's section about custom data type conversion"/>.
</p>
<h3>Mapping to user type with an inline converter</h3>
<p>
For convenience, you can inline your converter code directly into the configuration instead of providing a class reference.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Associate that custom type with your inline converter. -->
<converter>org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)</converter>
<!-- These are the same as for type rewriting -->
<expression>.*\.DATE_OF_.*</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withConverter("org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)")
.withExpression(".*\.DATE_OF_.*")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
converter = 'org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)'
expression = '.*\.DATE_OF_.*'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to an enum user type with a converter</h3>
<p>
If your user type is a Java enum, you can use the <code>&lt;enumConverter/&gt;</code> convenience flag instead of an explicit converter per enum type. This will apply the built-in <reference class="org.jooq.impl.EnumConverter"/>.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Apply the built in org.jooq.impl.EnumConverter. -->
<enumConverter>true</enumConverter>
<!-- These are the same as for type rewriting -->
<expression>.*\.MY_STATUS</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withEnumConverter(true)
.withExpression(".*\.MY_STATUS")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
enumConverter = true
expression = '.*\.MY_STATUS'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to user type with a binding</h3>
<p>
@ -18052,11 +17911,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -18919,7 +18776,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -626,26 +626,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -8491,8 +8490,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10514,11 +10512,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -12170,10 +12166,6 @@ for (BookRecord book : create.selectFrom(BOOK).fetch()) {
}
}]]></java><html>
<p>
If you're using <reference id="codegen-database-forced-types" title="forcedTypes"/> in your code generation configuration, you can configure the application of an <code>EnumConverter</code> by adding <code>&lt;enumConverter&gt;true&lt;/enumConverter&gt;</code> to your <code>&lt;forcedType/&gt;</code> configuration.
</p>
<h3>Using Converters in generated source code</h3>
<p>
jOOQ also allows for generated source code to reference your own custom converters, in order to permanently replace a <reference id="table-columns" title="table column's"/> &lt;T&gt; type by your own, custom &lt;U&gt; type. See the manual's section about <reference id="custom-data-types" title="custom data types"/> for details.
@ -12514,8 +12506,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -15707,7 +15698,7 @@ result.forEach((Object[] entities) -> {
<li><code>org.jooq.meta.oracle.OracleDatabase</code></li>
<li><code>org.jooq.meta.postgres.PostgresDatabase</code></li>
<li><code>org.jooq.meta.redshift.RedshiftDatabase</code></li>
<li><code>org.jooq.meta.sqlite.SQLiteDatabase</code></li>
<li><code>org.jooq.meta.sqlite.SQLiteDatabaes</code></li>
<li><code>org.jooq.meta.sqlserver.SQLServerDatabase</code></li>
<li><code>org.jooq.meta.sybase.SybaseDatabase</code></li>
<li><code>org.jooq.meta.vertica.VerticaDatabase</code></li>
@ -16953,138 +16944,6 @@ public class CaseInsensitiveOrderProvider implements Comparator<Definition> {
For more information about using converters, <reference id="custom-data-types" title="please refer to the manual's section about custom data type conversion"/>.
</p>
<h3>Mapping to user type with an inline converter</h3>
<p>
For convenience, you can inline your converter code directly into the configuration instead of providing a class reference.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Associate that custom type with your inline converter. -->
<converter>org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)</converter>
<!-- These are the same as for type rewriting -->
<expression>.*\.DATE_OF_.*</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withConverter("org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)")
.withExpression(".*\.DATE_OF_.*")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
converter = 'org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)'
expression = '.*\.DATE_OF_.*'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to an enum user type with a converter</h3>
<p>
If your user type is a Java enum, you can use the <code>&lt;enumConverter/&gt;</code> convenience flag instead of an explicit converter per enum type. This will apply the built-in <reference class="org.jooq.impl.EnumConverter"/>.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Apply the built in org.jooq.impl.EnumConverter. -->
<enumConverter>true</enumConverter>
<!-- These are the same as for type rewriting -->
<expression>.*\.MY_STATUS</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withEnumConverter(true)
.withExpression(".*\.MY_STATUS")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
enumConverter = true
expression = '.*\.MY_STATUS'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to user type with a binding</h3>
<p>
@ -18763,11 +18622,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -19656,7 +19513,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.codegen.GenerationTool.generate(writer.toString())
org.jooq.codegen.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.meta.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -627,25 +627,24 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -3564,9 +3563,6 @@ SELECT [TABLE].[COLUMN] FROM [TABLE] -- SQL Server style]]></sql><html>
<renderNameStyle>AS_IS</renderNameStyle>
</settings>]]></xml><html>
<p>
The behaviour of this setting is influenced by the <reference id="settings-locale" title="renderLocale setting"/>.
</p>
</html></content>
</section>
@ -3604,31 +3600,6 @@ SELECT [TABLE].[COLUMN] FROM [TABLE] -- SQL Server style]]></sql><html>
</html></content>
</section>
<section id="settings-locale">
<title>Render Locale</title>
<content><html>
<p>
When doing locale sensitive operations, such as upper casing or lower casing a name (see <reference id="settings-name-style" title="Name styles"/>), then it may be important in some areas to be able to specify the <reference class="java.util.Locale" title="java.util.Locale"/> for the operation.
</p>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[Settings settings = new Settings()
.withRenderLocale(Locale.forLanguageTag("en-US")); // Defaults to Locale.getDefault()]]></java><html>
<p>
<strong>XML configuration</strong>
</p>
</html><xml><![CDATA[<settings xmlns="http://www.jooq.org/xsd/jooq-runtime-{runtime-xsd-version}.xsd">
<renderLocale>en-US</renderLocale>
</settings>]]></xml><html>
</html></content>
</section>
<section id="settings-parameter-type">
<title>Parameter types</title>
<content><html>
@ -8533,8 +8504,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10556,11 +10526,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -12212,10 +12180,6 @@ for (BookRecord book : create.selectFrom(BOOK).fetch()) {
}
}]]></java><html>
<p>
If you're using <reference id="codegen-database-forced-types" title="forcedTypes"/> in your code generation configuration, you can configure the application of an <code>EnumConverter</code> by adding <code>&lt;enumConverter&gt;true&lt;/enumConverter&gt;</code> to your <code>&lt;forcedType/&gt;</code> configuration.
</p>
<h3>Using Converters in generated source code</h3>
<p>
jOOQ also allows for generated source code to reference your own custom converters, in order to permanently replace a <reference id="table-columns" title="table column's"/> &lt;T&gt; type by your own, custom &lt;U&gt; type. See the manual's section about <reference id="custom-data-types" title="custom data types"/> for details.
@ -12556,8 +12520,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -15751,7 +15714,7 @@ result.forEach((Object[] entities) -> {
<li><code>org.jooq.meta.oracle.OracleDatabase</code></li>
<li><code>org.jooq.meta.postgres.PostgresDatabase</code></li>
<li><code>org.jooq.meta.redshift.RedshiftDatabase</code></li>
<li><code>org.jooq.meta.sqlite.SQLiteDatabase</code></li>
<li><code>org.jooq.meta.sqlite.SQLiteDatabaes</code></li>
<li><code>org.jooq.meta.sqlserver.SQLServerDatabase</code></li>
<li><code>org.jooq.meta.sybase.SybaseDatabase</code></li>
<li><code>org.jooq.meta.vertica.VerticaDatabase</code></li>
@ -16997,138 +16960,6 @@ public class CaseInsensitiveOrderProvider implements Comparator<Definition> {
For more information about using converters, <reference id="custom-data-types" title="please refer to the manual's section about custom data type conversion"/>.
</p>
<h3>Mapping to user type with an inline converter</h3>
<p>
For convenience, you can inline your converter code directly into the configuration instead of providing a class reference.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Associate that custom type with your inline converter. -->
<converter>org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)</converter>
<!-- These are the same as for type rewriting -->
<expression>.*\.DATE_OF_.*</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withConverter("org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)")
.withExpression(".*\.DATE_OF_.*")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
converter = 'org.jooq.Converter.ofNullable(Integer.class, MyEnum.class, i -> MyEnum.values()[i], MyEnum::ordinal)'
expression = '.*\.DATE_OF_.*'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to an enum user type with a converter</h3>
<p>
If your user type is a Java enum, you can use the <code>&lt;enumConverter/&gt;</code> convenience flag instead of an explicit converter per enum type. This will apply the built-in <reference class="org.jooq.impl.EnumConverter"/>.
</p>
<p>
<strong>XML configuration (standalone and Maven)</strong>
</p>
</html><xml><![CDATA[<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-{codegen-xsd-version}.xsd">
<generator>
<database>
<!-- The first matching forcedType will be applied to the data type definition. -->
<forcedTypes>
<forcedType>
<!-- Specify the Java type of your custom type. This corresponds to the Converter's <U> type. -->
<userType>com.example.MyEnum</userType>
<!-- Apply the built in org.jooq.impl.EnumConverter. -->
<enumConverter>true</enumConverter>
<!-- These are the same as for type rewriting -->
<expression>.*\.MY_STATUS</expression>
<types>.*</types>
</forcedType>
</forcedTypes>
</database>
</generator>
</configuration>]]></xml><html>
<p>
<strong>Programmatic configuration</strong>
</p>
</html><java><![CDATA[configuration
.withGenerator(new Generator(
.withDatabase(new Database()
// The first matching forcedType will be applied to the data type definition.
.withForcedTypes(new ForcedType()
.withUserType("com.example.MyEnum")
.withEnumConverter(true)
.withExpression(".*\.MY_STATUS")
.withTypes(".*")))));]]></java><html>
<p>
<strong>Gradle configuration</strong>
</p>
</html><java><![CDATA[myConfigurationName(sourceSets.main) {
generator {
database {
// The first matching forcedType will be applied to the data type definition.
forcedTypes {
forcedType {
userType = 'com.example.MyEnum'
enumConverter = true
expression = '.*\.MY_STATUS'
types = '.*'
}
}
}
}
}]]></java><html>
<h3>Mapping to user type with a binding</h3>
<p>
@ -18807,11 +18638,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -19370,7 +19199,8 @@ CREATE TABLE book_to_book_store (
Where:
- ** matches any directory subtree
- * matches any number of characters in a directory / file name
- ? matches a single character in a directory / file name -->
- ? matches a single character in a directory / file name
-->
<property>
<key>scripts</key>
<value>src/main/resources/database.sql</value>
@ -19380,22 +19210,12 @@ CREATE TABLE book_to_book_store (
- semantic: sorts versions, e.g. v-3.10.0 is after v-3.9.0 (default)
- alphanumeric: sorts strings, e.g. v-3.10.0 is before v-3.9.0
- none: doesn't sort directory contents after fetching them from the directory -->
- none: doesn't sort directory contents after fetching them from the directory
-->
<property>
<key>sort</key>
<value>semantic</value>
</property>
<!-- The default schema for unqualified objects:
- public: all unqualified objects are located in the PUBLIC (upper case) schema
- none: all unqualified objects are located in the default schema (default)
This configuration can be overridden with the schema mapping feature -->
<property>
<key>unqualifiedSchema</key>
<value>none</value>
</property>
</properties>
</database>
</generator>
@ -19712,7 +19532,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.codegen.GenerationTool.generate(writer.toString())
org.jooq.codegen.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.meta.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -619,26 +619,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -5547,8 +5546,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -8718,8 +8716,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -39,7 +39,7 @@
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
-->
<manual version="3.3" end-of-life="true">
<manual version="3.3" end-of-life="false">
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content><html>
@ -625,26 +625,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -6202,8 +6201,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -9517,8 +9515,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -39,7 +39,7 @@
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
-->
<manual version="3.4" end-of-life="true">
<manual version="3.4" end-of-life="false">
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content><html>
@ -626,26 +626,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -7108,8 +7107,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10483,8 +10481,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)

View File

@ -39,7 +39,7 @@
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
-->
<manual version="3.5" end-of-life="true">
<manual version="3.5" end-of-life="false">
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content><html>
@ -626,26 +626,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -7492,8 +7491,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10917,8 +10915,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -12840,7 +12837,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>
@ -14216,11 +14215,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters

View File

@ -39,7 +39,7 @@
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
-->
<manual version="3.6" end-of-life="true">
<manual version="3.6" end-of-life="false">
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content><html>
@ -627,26 +627,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -7646,8 +7645,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -9436,11 +9434,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -11353,8 +11349,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -14865,11 +14860,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -15497,7 +15490,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -627,26 +627,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -7918,8 +7917,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -9708,11 +9706,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -11704,8 +11700,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -15279,11 +15274,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -15941,7 +15934,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -627,26 +627,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -8094,8 +8093,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -9932,11 +9930,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -11928,8 +11924,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -15589,11 +15584,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -16241,7 +16234,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -627,26 +627,25 @@ Result<Record> result = create.fetch(rs);]]></java><html>
<section id="jooq-for-crud">
<title>jOOQ for CRUD</title>
<content><html>
<p>
Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
<p>
This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here:
</p>
</html><java><![CDATA[// Fetch an author
AuthorRecord author : create.fetchOne(AUTHOR, AUTHOR.ID.eq(1));
</html><java><![CDATA[// Fetch all authors
for (AuthorRecord author : create.fetch(AUTHOR)) {
// Create a new author, if it doesn't exist yet
if (author == null) {
author = create.newRecord(AUTHOR);
author.setId(1);
author.setFirstName("Dan");
author.setLastName("Brown");
}
// Skip previously distinguished authors
if ((int) author.getDistinguished() == 1)
continue;
// Mark the author as a "distinguished" author and store it
author.setDistinguished(1);
// Check if the author has written more than 5 books
if (author.fetchChildren(Keys.FK_BOOK_AUTHOR).size() > 5) {
// Executes an update on existing authors, or insert on new ones
author.store();]]></java><html>
// Mark the author as a "distinguished" author
author.setDistinguished(1);
author.store();
}
}]]></java><html>
<p>
If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections):
@ -8229,8 +8228,7 @@ Field<T> nextval();]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -10063,11 +10061,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -12089,8 +12085,7 @@ BigInteger currID = create.currval(S_AUTHOR_ID);]]></java><html>
</p>
</html><java><![CDATA[// Reference the sequence in a SELECT statement:
Field<BigInteger> s = S_AUTHOR_ID.nextval();
BigInteger nextID = create.select(s).fetchOne(s);
BigInteger nextID = create.select(s).fetchOne(S_AUTHOR_ID.nextval());
// Reference the sequence in an INSERT statement:
create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
@ -14677,7 +14672,7 @@ result.forEach((Object[] entities) -> {
<li><code>org.jooq.util.oracle.OracleDatabase</code></li>
<li><code>org.jooq.util.postgres.PostgresDatabase</code></li>
<li><code>org.jooq.util.redshift.RedshiftDatabase</code></li>
<li><code>org.jooq.util.sqlite.SQLiteDatabase</code></li>
<li><code>org.jooq.util.sqlite.SQLiteDatabaes</code></li>
<li><code>org.jooq.util.sqlserver.SQLServerDatabase</code></li>
<li><code>org.jooq.util.sybase.SybaseDatabase</code></li>
<li><code>org.jooq.util.vertica.VerticaDatabase</code></li>
@ -17487,11 +17482,9 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
@Override
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (ctx.render().paramType() == ParamType.INLINED)
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
else
ctx.render().sql("?::json");
// between jOOQ generating bind variables or inlined literals. If so, use this check:
// ctx.render().paramType() == INLINED
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
}
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
@ -18216,7 +18209,9 @@ def xml = new groovy.xml.MarkupBuilder(writer)
// Run the code generator
// ----------------------
org.jooq.util.GenerationTool.generate(writer.toString())
org.jooq.util.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
]]></java><html>
</html></content>
</section>

View File

@ -213,68 +213,68 @@ public interface WindowRowsStep<T> extends WindowFinalStep<T> {
* Add a <code>GROUPS UNBOUNDED PRECEDING</code> frame clause to the window
* function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowExcludeStep<T> groupsUnboundedPreceding();
/**
* Add a <code>GROUPS [number] PRECEDING</code> frame clause to the window
* function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowExcludeStep<T> groupsPreceding(int number);
/**
* Add a <code>GROUPS CURRENT ROW</code> frame clause to the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowExcludeStep<T> groupsCurrentRow();
/**
* Add a <code>GROUPS UNBOUNDED FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowExcludeStep<T> groupsUnboundedFollowing();
/**
* Add a <code>GROUPS [number] FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowExcludeStep<T> groupsFollowing(int number);
/**
* Add a <code>GROUPS BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowRowsAndStep<T> groupsBetweenUnboundedPreceding();
/**
* Add a <code>GROUPS BETWEEN [number] PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowRowsAndStep<T> groupsBetweenPreceding(int number);
/**
* Add a <code>GROUPS BETWEEN CURRENT ROW ...</code> frame clause to
* the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowRowsAndStep<T> groupsBetweenCurrentRow();
/**
* Add a <code>GROUPS BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowRowsAndStep<T> groupsBetweenUnboundedFollowing();
/**
* Add a <code>GROUPS BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowRowsAndStep<T> groupsBetweenFollowing(int number);
}

View File

@ -89,19 +89,19 @@ public interface WindowSpecificationExcludeStep extends WindowSpecificationFinal
/**
* Add an <code>EXCLUDE CURRENT ROW</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationFinalStep excludeCurrentRow();
/**
* Add an <code>EXCLUDE GROUP</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationFinalStep excludeGroup();
/**
* Add an <code>EXCLUDE TIES</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationFinalStep excludeTies();
/**

View File

@ -230,69 +230,69 @@ public interface WindowSpecificationRowsStep extends WindowSpecificationFinalSte
* Add a <code>GROUPS UNBOUNDED PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationExcludeStep groupsUnboundedPreceding();
/**
* Add a <code>GROUPS [number] PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationExcludeStep groupsPreceding(int number);
/**
* Add a <code>GROUPS CURRENT ROW</code> frame clause to the window
* specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationExcludeStep groupsCurrentRow();
/**
* Add a <code>GROUPS UNBOUNDED FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationExcludeStep groupsUnboundedFollowing();
/**
* Add a <code>GROUPS [number] FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationExcludeStep groupsFollowing(int number);
/**
* Add a <code>GROUPS BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationRowsAndStep groupsBetweenUnboundedPreceding();
/**
* Add a <code>GROUPS BETWEEN [number] PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationRowsAndStep groupsBetweenPreceding(int number);
/**
* Add a <code>GROUPS BETWEEN CURRENT ROW ...</code> frame clause to the
* window specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationRowsAndStep groupsBetweenCurrentRow();
/**
* Add a <code>GROUPS BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationRowsAndStep groupsBetweenUnboundedFollowing();
/**
* Add a <code>GROUPS BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
WindowSpecificationRowsAndStep groupsBetweenFollowing(int number);
}

View File

@ -18070,7 +18070,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationExcludeStep groupsUnboundedPreceding() {
return new WindowSpecificationImpl().groupsUnboundedPreceding();
}
@ -18078,7 +18078,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationExcludeStep groupsPreceding(int number) {
return new WindowSpecificationImpl().groupsPreceding(number);
}
@ -18086,7 +18086,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationExcludeStep groupsCurrentRow() {
return new WindowSpecificationImpl().groupsCurrentRow();
}
@ -18094,7 +18094,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationExcludeStep groupsUnboundedFollowing() {
return new WindowSpecificationImpl().groupsUnboundedFollowing();
}
@ -18102,7 +18102,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationExcludeStep groupsFollowing(int number) {
return new WindowSpecificationImpl().groupsFollowing(number);
}
@ -18110,7 +18110,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationRowsAndStep groupsBetweenUnboundedPreceding() {
return new WindowSpecificationImpl().groupsBetweenUnboundedPreceding();
}
@ -18118,7 +18118,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationRowsAndStep groupsBetweenPreceding(int number) {
return new WindowSpecificationImpl().groupsBetweenPreceding(number);
}
@ -18126,7 +18126,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationRowsAndStep groupsBetweenCurrentRow() {
return new WindowSpecificationImpl().groupsBetweenCurrentRow();
}
@ -18134,7 +18134,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationRowsAndStep groupsBetweenUnboundedFollowing() {
return new WindowSpecificationImpl().groupsBetweenUnboundedFollowing();
}
@ -18142,7 +18142,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>GROUPS</code> clause.
*/
@Support({ POSTGRES_11 })
@Support({ H2, POSTGRES_11 })
public static WindowSpecificationRowsAndStep groupsBetweenFollowing(int number) {
return new WindowSpecificationImpl().groupsBetweenFollowing(number);
}