Commit Graph

7297 Commits

Author SHA1 Message Date
Knut Wannheden
b1bebfbb0e [jOOQ/jOOQ#8739] Support ALTER SCHEMA in H2 2019-06-05 16:16:34 +02:00
Knut Wannheden
2765329af3 [jOOQ/jOOQ#8736] Add Tools#tryParseInt() and Tools#tryParseLong()
For the benefit of performance Tools#renderAndBind() now no longer uses
Integer#parseInt() when deciding whether a placeholder is a keyword or
an index of a bind value.

Also AbstractQuery#bind(String, Object) and DefaultBinding#parse(Class,
String) no longer rely on Integer#parseInt() or Long#parseLong().

The new methods in Tools are based on the Guava method
Longs#tryParse(String, int).
2019-06-05 12:39:08 +02:00
Knut Wannheden
56ee881246 [jOOQ/jOOQ#8737] Fix date arithmetic does not support fractional seconds
Date arithmetic now uses strftime(), so that fractional seconds don't
get trimmed.
2019-06-05 09:47:07 +02:00
Knut Wannheden
37727bee41 [jOOQ/jOOQ#8735] Support Offset[Date]Time and Instant for SQLite
For SQLite the Java 8 time types Offset[Date|DateTime|Time] and Instant
are now supported. SQLite basically supports date and time data with
time zones as input. Returned values are however always in Zulu / UTC
time, as with some other dialects.
2019-06-05 08:44:08 +02:00
Knut Wannheden
a67fbe5b79 [jOOQ/jOOQ#8730] Fix binding of Java 8 date and time literals
In SQLite the binding of [Local|Offset][Date][Time] literals didn't
always work correctly when the value specified fractional seconds. This
was because the corresponding DSL method would return a DateOrTime
instance rather than a simple Tools#field() constructed instance. This
commit fixes that.
2019-06-05 08:41:55 +02:00
Lukas Eder
11c5e08fc5 [jOOQ/jOOQ#7389] UniqueKey.getReferences returns unnamed foreign keys 2019-06-04 16:50:32 +02:00
Lukas Eder
7c94342142 [jOOQ/jOOQ#2059] Fixed regression
This newly introduced DISTINCT keyword needs to include all columns that appear in the ORDER BY clause. I'm not sure if the effect is still the desired one in MemSQL (nor why this even worked in MemSQL), but it doesn't work in MySQL this way.
2019-06-04 16:25:26 +02:00
Lukas Eder
d538acfac6 [jOOQ/jOOQ#8723] Fixed parser test 2019-06-03 11:03:48 +02:00
Lukas Eder
9f363f75d4 Whitespace change 2019-06-03 10:13:29 +02:00
Lukas Eder
1599efa5f9 [jOOQ/jOOQ#8727] Bad Support annotation on Row[N].op(QuantifiedSelect) 2019-06-03 10:13:07 +02:00
Lukas Eder
6c5bc13cc1 [jOOQ/jOOQ#7120] SQL Server fix 2019-05-31 15:15:44 +02:00
Lukas Eder
712b4afad7 [jOOQ/jOOQ#8723] Fixed this issue for PostgreSQL 2019-05-31 14:42:31 +02:00
Lukas Eder
f33b1f1512 [jOOQ/jOOQ#8723] Fixed this issue for MariaDB / MySQL 2019-05-31 14:37:12 +02:00
Lukas Eder
72964e352c [jOOQ/jOOQ#8041] Add support for DataType.characterSet() 2019-05-31 14:17:06 +02:00
Lukas Eder
290a1bf487 [jOOQ/jOOQ#8724] Add UpdateSetStep.setNull(Field<?>) for convenience 2019-05-31 13:37:47 +02:00
Lukas Eder
bfd68f5947 [jOOQ/jOOQ#8723] Wrong SQL generated when using qualified index references with H2 CREATE or DROP INDEX statements 2019-05-31 13:05:10 +02:00
Lukas Eder
05a613ef5d Added pluginManagement for Surefire plugin 2019-05-29 16:16:22 +02:00
Lukas Eder
5b281e2795 Merge branch 'master' of https://github.com/jOOQ/jOOQ 2019-05-29 16:15:40 +02:00
Lukas Eder
999a4eb761 [jOOQ/jOOQ#8717] Support parsing SQL Server's UNIQUEIDENTIFIER data type 2019-05-29 16:15:15 +02:00
Knut Wannheden
dd9b685055 [jOOQ/jOOQ#8716] Support DSL#md5() for SQL Server and SQL Data Warehouse 2019-05-29 15:41:19 +02:00
Knut Wannheden
8ca6c01264 Simplify @Support annotation on createTable()
The @Support annotations on DSL#createTable() and
DSLContext#createTable() don't need to explicitly list all families.
2019-05-29 08:04:06 +02:00
Lukas Eder
3bb2fef32d [jOOQ/jOOQ#6920] Update API with Vertica Support annotations 2019-05-28 17:56:36 +02:00
Knut Wannheden
8b4e41dacf [#8682] Correctly parse SQL Server LOG() function 2019-05-28 17:00:52 +02:00
Knut Wannheden
635cbc1874 [#8682] Correctly parse SQL Server LOG() function
SQL Server's LOG() function defines the parameters in reverse order from
the SQL standard (see
https://docs.microsoft.com/sql/t-sql/functions/log-transact-sql?view=sql-server-2017).
Also, instead of a dedicated LN() function the natural logarithm is
calculated by omitting the second parameter (representing the base). The
same applies to SQL Data Warehouse.

Again reverting change in DSL#log(Number, int) to use Tools#field() over
DSL#val().
2019-05-28 16:53:53 +02:00
Lukas Eder
2327516eaa [jOOQ/jOOQ#8709] Work around Vertica's incorrect IS NOT NULL implementation 2019-05-28 16:26:03 +02:00
Knut Wannheden
988e868444 [#8703] Use DSL#val(Object) over Tools#field(Object)
In DSL#log(Number, int) the input is known to be a Number so it makes
more sense to call DSL#val(Object) directly.
2019-05-28 16:20:33 +02:00
Lukas Eder
9459e9fc49 [jOOQ/jOOQ#8708] Ranking functions without ORDER BY are not correctly emulated in Vertica 2019-05-28 16:10:28 +02:00
Lukas Eder
a083eb10d1 [jOOQ/jOOQ#8706] Error when translating a query with OFFSET only (no LIMIT) to Vertica 2019-05-28 16:02:48 +02:00
Knut Wannheden
4e88bb2727 [#8707] Fix switch in FunctionTable#accept() 2019-05-28 15:59:06 +02:00
Knut Wannheden
d751d6edc7 [#8547] Fix SQLITE comparisons against dialect
SQLITE should normally be compared against the dialect family.

Also replace some occurrences of `context.configuration().dialect()`
with `context.dialect()`.
2019-05-28 15:51:08 +02:00
Knut Wannheden
2b26053a64 [jOOQ/jOOQ#6920] Update API with Vertica Support annotations 2019-05-28 15:32:00 +02:00
Knut Wannheden
de263dc9b8 [#8547] Add missing SQLITE_3_x cases to switches
Add missing cases for SQLITE_3_25 and SQLITE_3_28 in dialect switches.
2019-05-28 15:17:10 +02:00
Knut Wannheden
2e6a9514c3 [#8703] Add DSL#log(Field, Field)
Adds an overload DSL#log(Field, Field) which is also used by the parser,
as the base can for multiple dialects both be a float literal or an
arbitrary expression.
2019-05-28 15:05:01 +02:00
Lukas Eder
89a1751918 [jOOQ/jOOQ#6920] Update API with Vertica Support annotations 2019-05-28 14:55:29 +02:00
Lukas Eder
1a849a9232 [jOOQ/jOOQ#6920] Update API with Vertica Support annotations 2019-05-28 14:55:05 +02:00
Lukas Eder
130db06e3c [jOOQ/jOOQ#8704] Add support for MERGE in Vertica 2019-05-28 14:53:58 +02:00
Knut Wannheden
1cd7aa47fb [#8696] Added "fall through" comments to make code better readable 2019-05-28 12:59:38 +02:00
Knut Wannheden
a986cd0380 [#8696] Use SQL Server 2012's LOG() function with base parameter
SQL Server 2012's LOG() function accepts an optional second parameter to
specify the "base" to use. Use this rather than emulate that function.
2019-05-28 12:39:21 +02:00
Knut Wannheden
0b8f7cc111 [#8699] In Trim add case for SQLITE_3_25 and SQLITE_3_28
The switch over Configuration#dialect() was missing cases for
SQLITE_3_25 and SQLITE_3_28.
2019-05-28 12:17:21 +02:00
Knut Wannheden
2ef879d6bc [#8699] In Trim add case for SQLITE_3_25 and SQLITE_3_28
The switch over Configuration#dialect() was missing cases for
SQLITE_3_25 and SQLITE_3_28.
2019-05-28 12:15:34 +02:00
Knut Wannheden
893ce190e3 [#8698] In Sign switch over Configuration#family()
The switch over Sign#dialect() was wrong (typo).
2019-05-28 12:09:09 +02:00
Knut Wannheden
9a7e111fb9 [#8697] Removed MYSQL case from switch in MD5
Since the case was the default ayway it (along with some others) could
be removed.
2019-05-28 12:02:34 +02:00
Lukas Eder
5da1c032e4 Merge branch 'master' of https://github.com/jOOQ/jOOQ 2019-05-28 11:53:47 +02:00
Knut Wannheden
ed0634f0cb [#8695] Use Configuration#family() convenience method
Replace expressions like `configuration.dialect().family()` with
`configuration.family()`.
2019-05-28 11:41:04 +02:00
Knut Wannheden
e1b64b4987 [#8694] Floor must switch over Configuration#family() 2019-05-28 11:30:59 +02:00
Lukas Eder
5598a94899 [#8685] Regenerated example and test code 2019-05-28 10:30:55 +02:00
Lukas Eder
e8dab8a763 [#7921] Prevent NPE from unattached queries 2019-05-28 10:28:49 +02:00
Knut Wannheden
28d5cfa220 Upgrade to properties-maven-plugin 1.0.0
Most pom.xml files (with the exception of jOOQ-test) used version
1.0-alpha-2 of properties-maven-plugin. Now all use 1.0.0.
2019-05-28 09:45:16 +02:00
Lukas Eder
e16465c56b [jOOQ/jOOQ#8693] Add support for generation of comments on HSQLDB schema objects 2019-05-27 13:16:13 +02:00
Lukas Eder
7b82eff279 [#8691] Serialization fails when table contains SQLDataType.INSTANT
columns or when using Converter.ofNullable() converters
2019-05-27 12:45:40 +02:00