Commit Graph

7650 Commits

Author SHA1 Message Date
Knut Wannheden
36941b75b0 [jOOQ/jOOQ#8528] Add basic support for PRIMARY KEY constraints 2019-09-18 12:48:57 +02:00
Lukas Eder
c7247311d0 [jOOQ/jOOQ#9241] Change <varargSetters/> to default to false 2019-09-18 12:34:34 +02:00
Knut Wannheden
25458d13b8 [jOOQ/jOOQ#9240] Compare to AbstractName.NO_NAME using equals() 2019-09-18 12:10:34 +02:00
Lukas Eder
036919ec31 [jOOQ/jOOQ#9224] Regression for "= ANY(?::int[])"
DSL.any(T...) no longer produces array bind variable in PostgreSQL, when used with natively supported quantified comparison operators like =, !=, etc.

This commit fixes the issue and refactors some of the internals to prevent some casting
2019-09-18 11:36:08 +02:00
Lukas Eder
052568248c [jOOQ/jOOQ#9233] Use new Source API throughout the jOOQ API
Added Source support to MockFileDatabase
2019-09-18 09:45:53 +02:00
Lukas Eder
d2d2da6e05 [jOOQ/jOOQ#9237] Remove checked exceptions from MockFileDatabaseConfiguration::source methods 2019-09-18 09:43:55 +02:00
Lukas Eder
56530816d2 [jOOQ/jOOQ#9233] Use new Source API throughout the jOOQ API 2019-09-18 09:37:37 +02:00
Lukas Eder
118d3148fc [jOOQ/jOOQ#9233] Use new Source API throughout the jOOQ API
Always produce BufferedReader in Source.reader() when reading from File
2019-09-18 09:22:30 +02:00
Lukas Eder
2c4a05b1d5 [jOOQ/jOOQ#9233] Use new Source API throughout the jOOQ API
- LoaderSourceStep.loadCSV
- LoaderSourceStep.loadJSON
- LoaderSourceStep.loadXML
2019-09-17 18:07:18 +02:00
Lukas Eder
44e82bdb63 [jOOQ/jOOQ#9235] Remove checked exceptions from LoaderSourceStep 2019-09-17 17:52:43 +02:00
Lukas Eder
cc69dfef40 [jOOQ/jOOQ#9043] API no longer internal in 3.13 2019-09-17 17:17:40 +02:00
Lukas Eder
df7180f3fa [jOOQ/jOOQ#9231] Wrong Javadoc on org.jooq.Source 2019-09-17 17:14:02 +02:00
Knut Wannheden
596cfd6ad6 [jOOQ/jOOQ#8528] Support IF [NOT] EXISTS clause
Currently the implementation is hard-coded to throw a
`DataAccessException`. In the future there will be a feature flag for
this.
2019-09-17 17:01:49 +02:00
Lukas Eder
e4e803beea [jOOQ/jOOQ#9132] Support parsing MySQL's USING [ BTREE | HASH ] index type syntax everywhere where it is supported 2019-09-17 16:34:40 +02:00
Knut Wannheden
b4af3ab133 Cleanup: Consistently use Configuration#family()
Use `Configuration#family()` and `Scope#family()` whenever possible
rather than the corresponding `dialect()` method.
2019-09-17 14:11:45 +02:00
Knut Wannheden
85ddf1f4d9 [jOOQ/jOOQ#9223] MariaDB also supports MICROSECOND and WEEK 2019-09-17 11:36:53 +02:00
Knut Wannheden
37aed04685 [jOOQ/jOOQ#9223] Support MICROSECOND and WEEK for MySQL and MemSQL 2019-09-17 11:31:50 +02:00
Knut Wannheden
1bc29aec2e [jOOQ/jOOQ#9222] Align @Support annotations in DatePart and DSL
Many `DatePart` constants have a corresponding convenience method in
`DSL` which calls `EXTRACT()` using that `DatePart`. Here the `@Support`
annotations of the enum constants and the convenience methods should
align.
2019-09-17 11:19:16 +02:00
Knut Wannheden
ddc47a36c9 [jOOQ/jOOQ#9221] Postgres supports DateParts MILLISECOND and MICROSECOND 2019-09-17 08:29:33 +02:00
Knut Wannheden
223a90a155 [jOOQ/jOOQ#9213] Add missing case to dialect-switch in InsertQueryImpl
Cleaned up a few switch statements.
2019-09-17 08:14:04 +02:00
Knut Wannheden
b0cd35a7c2 [jOOQ/jOOQ#9219] Detail: Reuse acceptNativeFunction() 2019-09-17 07:51:07 +02:00
Knut Wannheden
8131fbd857 [jOOQ/jOOQ#9219] Fix rendering of EXTRACT() for Postgres
Some date parts were incorrectly rendered in the context of the
`EXTRACT()` function.
2019-09-17 07:48:29 +02:00
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