Commit Graph

7628 Commits

Author SHA1 Message Date
Knut Wannheden
a837e9dca6 [jOOQ/jOOQ#8528] Add Configuration to DDLInterpreter 2019-09-17 07:19:03 +02:00
Knut Wannheden
0568f9a83b [jOOQ/jOOQ#8528] Make code Java 6 compatible 2019-09-16 13:39:00 +02:00
Lukas Eder
f01a861b6f [jOOQ/jOOQ#9217] Support parsing MySQL's USING HASH index_type in CREATE INDEX 2019-09-16 12:12:18 +02:00
Lukas Eder
da8aa2b01d [jOOQ/jOOQ#9213] Introduce versioned MARIADB dialects 2019-09-16 10:41:37 +02:00
Lukas Eder
2b4d918c0a Use ojdbc from Maven Central 2019-09-16 10:25:55 +02:00
Lukas Eder
41b56545f8 [jOOQ/jOOQ#9214] SQLDialect.MEMSQL lacks Pro annotation 2019-09-16 10:25:40 +02:00
Knut Wannheden
7c98a5a5d8 [jOOQ/jOOQ#8528] Initial work on DDL simulation
Adds a new `DDLInterpreterMetaProvider` (might eventually replace
`DDLMetaProvider`) which interprets DDL scripts by first parsing them
using jOOQ's `Parser`.

To extract information the implementation classes like `CreateTableImpl` have new package
private accessors. To avoid name conflicts with statically imported
methods (e.g. `DSL#table()`), the accessor methods have a `$`-prefix.
This is just a temporary solution until the object query model API is implemented, at which point these methods will be deleted again.

The `DDLInterpreter` for now just implements very basic `CREATE TABLE`, `ALTER TABLE`, and `DROP TABLE` support. The implementation will be completed incrementally.
2019-09-13 18:05:24 +02:00
Lukas Eder
e37d77087a [jOOQ/jOOQ#8621] [jOOQ/jOOQ#9209] Support for exceptions in mocks
[jOOQ/jOOQ#8621] Add support for exception syntax in MockFileDatabase
[jOOQ/jOOQ#9209] Add support for exceptions in MockResult
2019-09-13 17:22:29 +02:00
Knut Wannheden
dbb1aba882 [jOOQ/jOOQ#9201] Corrects DefaultDayToSecondBinding for Postgres
In the case of Postgres the interval literal syntax requires each
component to have its own sign. This in contrast to the SQL standard,
where the leading sign applies to all components in the interval.

`DefaultDayToSecondBinding` now overrides `sqlInline0()` and implements
this Postgres-specific formatting when rendering interval literals.
2019-09-13 15:42:26 +02:00
Knut Wannheden
28677b252e [jOOQ/jOOQ#9196] Fix date arithmetic in Expression
Fixes chained invocations of `Field#add()` on a DATE or TIMESTAMP field,
where the problem was that `Expression` had an override of `Field#add()`
which didn't match up with its implementation of `accept()`.
2019-09-12 10:52:30 +02:00
Lukas Eder
7761ac4ea8 [jOOQ/jOOQ#9194] Add support for RETURN in the procedural API 2019-09-11 16:55:50 +02:00
Lukas Eder
8449e46fdd [jOOQ/jOOQ#9193] Consecutive RenderContext.formatSeparator() calls ignored when formatIndentStart() is called in between 2019-09-11 16:34:59 +02:00
Lukas Eder
8f9e089351 [jOOQ/jOOQ#9192] Add DSL.statement(String), a plain SQL procedural Statement API 2019-09-11 14:58:35 +02:00
Knut Wannheden
9d6c999d58 [jOOQ/jOOQ#9084] Slightly simplify ParserContext implementation
`ParserContext` doesn't need both the `sql` and `sqlString` fields. The
`sql` field is enough.

Note that this change doesn't lower the parser's memory footprint, as
the original `String` object will still be on the stack for the whole
`Parser#parse()` call and can thus not be garbage collected.
2019-09-10 14:24:03 +02:00
Knut Wannheden
f58ae584cd [jOOQ/jOOQ#9186] Fix various @Support annotations for MariaDB
Also fix implementation in `JsonEntryImpl` for MariaDB.
2019-09-10 13:28:59 +02:00
Lukas Eder
99523abbfe [jOOQ/jOOQ#9183] Add support for DISTINCT ON in H2 2019-09-09 11:57:40 +02:00
Knut Wannheden
3448ff4925 [jOOQ/jOOQ#9177] Also support LIMIT PERCENT in parser of OSS edition 2019-09-06 12:24:05 +02:00
Knut Wannheden
2aedc1ec27 [jOOQ/jOOQ#9177] Correct implementation of LIMIT PERCENT in OSS edition 2019-09-06 11:28:28 +02:00
Knut Wannheden
4eec820189 Trim trailing blanks on last line of all files 2019-09-06 09:13:49 +02:00
Knut Wannheden
64ffad744a Cleanup import in AbstractQuery.java 2019-09-06 09:04:13 +02:00
lukaseder
22cc5aa124 [jOOQ/jOOQ#9130] Support MySQL FOREIGN KEY [ index_name ] syntax 2019-09-05 22:48:15 +02:00
Knut Wannheden
68d20996a1 Minor adjustments to pom.xml files 2019-09-05 21:37:34 +02:00
Knut Wannheden
0e1515cd6d [jOOQ/jOOQ#9144] ParserCLI "-f" flag does not work as shortcut for
"--from-dialect"
2019-09-05 21:34:08 +02:00
lukaseder
495baed1ee [jOOQ/jOOQ#9161] Add support for MySQL FULLTEXT KEY inline declaration in CREATE TABLE 2019-09-05 15:19:16 +02:00
lukaseder
b7f0d51034 [jOOQ/jOOQ#9166] Deprecate loading settings from /jooq-settings.xml or from -Dorg.jooq.settings 2019-09-05 14:25:32 +02:00
lukaseder
99d18b548d [jOOQ/jOOQ#9168] Add a DSL.execute(Query) convenience method 2019-09-05 14:04:29 +02:00
lukaseder
a930925dc0 [jOOQ/jOOQ#9171] Add Javadoc to DSL::execute 2019-09-05 13:56:01 +02:00
lukaseder
166a51ce53 Merge branch 'master' of https://github.com/jOOQ/jOOQ 2019-09-05 08:48:33 +02:00
Lukas Eder
b9398bb667 [jOOQ/jOOQ#9031] Remove unnecessary AlterSequenceRestartStep 2019-09-04 12:22:11 +02:00
Lukas Eder
642d66701c Regenerated code 2019-09-04 11:52:26 +02:00
Lukas Eder
d1c8460ada Regenerated code 2019-09-04 11:52:11 +02:00
Lukas Eder
3f76856790 Fixed version number 2019-09-04 11:51:55 +02:00
Lukas Eder
fe3ddf1d6f [jOOQ/jOOQ#9155] Revert checker framework upgrade 2019-09-04 11:51:36 +02:00
Lukas Eder
1076cefd1d [jOOQ/jOOQ#9155] Various third party dependency updates 2019-09-04 10:26:11 +02:00
Lukas Eder
d18b17d44d [jOOQ/jOOQ#9150] Compilation error in generated code when Oracle OBJECT type contains index_of(varchar2) member procedure 2019-09-03 17:43:35 +02:00
Lukas Eder
3859caff9e [jOOQ/jOOQ#9140] Translation of USE command should result in SET SCHEMA
command in dialects that do not support catalogs
2019-09-03 16:08:06 +02:00
Lukas Eder
e0ee5ee925 [jOOQ/jOOQ#9147] ParserCLI -h parameter throws a RuntimeException 2019-09-03 16:06:12 +02:00
Lukas Eder
201dc323ad [jOOQ/jOOQ#9146] ParserCLI --from-dialect is not case insensitive 2019-09-03 15:58:27 +02:00
Lukas Eder
babd9cee27 [jOOQ/jOOQ#9141] DDLDatabase should output query results to log output 2019-09-03 12:56:42 +02:00
Lukas Eder
4bad893e6a [jOOQ/jOOQ#9138] Parser errors from DDLDatabase should hint at jOOQ's parser ignore comment syntax 2019-09-03 12:15:57 +02:00
Lukas Eder
2bcd6d5020 [jOOQ/jOOQ#9133] 404s on /latest Javadoc 2019-09-03 10:55:39 +02:00
Knut Wannheden
4ac7f587e3 [jOOQ/jOOQ#9101] Synchronize Javadoc in generated JAXB classes
Now all three methods (`get`, `set`, and `with`) for a given property
have the same documentation (without any `@returns` or `@param` tags).

Further, in case the XSD doesn't specify any Javadoc, the methods won't
have any Javadoc either, instead of a meaningless "Gets the value of the
xyz property.".
2019-09-03 10:10:27 +02:00
Knut Wannheden
e046ece89c [jOOQ/jOOQ#9110] Fix rendering for countDistinct()
When calling `DSL#countDistinct(Field...)` with an empty array (as in
`countDistinct()`) the rendering is the same as for
`countDistinct(asterisk())`: `COUNT(DISTINCT *)`.
2019-09-03 09:08:08 +02:00
Knut Wannheden
a3f25af543 [jOOQ/jOOQ#9134] Fix NTH_VALUE() [ FROM { FIRST | LAST } ] rendering
The `NTH_VALUE() [ FROM { FIRST | LAST } ]` clause is rendered the same
for all dialects.
2019-09-03 09:04:08 +02:00
Knut Wannheden
eaf48e48ef [jOOQ/jOOQ#9111] Support parsing COUNT(DISTINCT ROW(A, B))
In H2 a row value expression can alternatively also use the `ROW()`
syntax.
2019-08-30 14:44:03 +02:00
Knut Wannheden
a8ffd253aa [jOOQ/jOOQ#9111] Support parsing COUNT(DISTINCT (A, B))
Dialects like H2 and PostgreSQL allow row value expressions following
the `DISTINCT` keyword.
2019-08-30 13:40:30 +02:00
Knut Wannheden
5c8549e8b0 [jOOQ/jOOQ#9109] H2: Support DSL#countDistinct(Field...)
As with PostgreSQL this MySQL construct can be emulated using an RVE.
2019-08-30 13:30:45 +02:00
Knut Wannheden
841dfa7bd5 [jOOQ/jOOQ#9099] Try using maven-javadoc-plugin 3.0.1 instead
There were still more problems while building the Javadoc for other
Maven modules (other than jooq-checker). Trying with
maven-javadoc-plugin version 3.0.1 now.
2019-08-30 12:44:13 +02:00
Knut Wannheden
c01c944041 [jOOQ/jOOQ#9099] Revert upgrade of Checker Framework version
This version upgrade is not needed for this fix.
2019-08-30 12:00:30 +02:00
Knut Wannheden
cef24d45f5 [jOOQ/jOOQ#9110] Fix parsing of COUNT(DISTINCT *) 2019-08-30 11:26:23 +02:00