Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: ydb jdbc driver make provided & remove org.jetbrains #152

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions jooq-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>tech.ydb.dialects</groupId>
<artifactId>jooq-ydb-dialect</artifactId>
<version>1.0.0-RC0</version>
<version>1.0.0-RC1</version>

<name>YDB JOOQ Dialect module</name>
<description>YDB JOOQ Dialect module</description>
Expand Down Expand Up @@ -36,6 +36,12 @@
<name>Ilya Kriushenkov</name>
<email>[email protected]</email>
</developer>
<developer>
<name>Kirill Kurdyukov</name>
<email>[email protected]</email>
<organization>YDB</organization>
<organizationUrl>https://ydb.tech/</organizationUrl>
</developer>
</developers>

<properties>
Expand All @@ -47,7 +53,7 @@
<jooq.version>3.19.0</jooq.version>

<ydb.sdk.version>2.2.6</ydb.sdk.version>
<ydb.jdbc.version>2.1.5</ydb.jdbc.version>
<ydb.jdbc.version>2.2.3</ydb.jdbc.version>
</properties>

<dependencies>
Expand All @@ -63,18 +69,13 @@
<version>${jooq.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tech.ydb.jdbc</groupId>
<artifactId>ydb-jdbc-driver-shaded</artifactId>
<artifactId>ydb-jdbc-driver</artifactId>
<version>${ydb.jdbc.version}</version>
<scope>compile</scope>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>tech.ydb.test</groupId>
<artifactId>ydb-junit5-support</artifactId>
Expand Down
123 changes: 19 additions & 104 deletions jooq-dialect/src/main/java/tech/ydb/jooq/YDB.java

Large diffs are not rendered by default.

105 changes: 52 additions & 53 deletions jooq-dialect/src/main/java/tech/ydb/jooq/YdbDSLContext.java

Large diffs are not rendered by default.

837 changes: 318 additions & 519 deletions jooq-dialect/src/main/java/tech/ydb/jooq/YdbFunction.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class DateBinding extends AbstractBinding<LocalDate, LocalDate> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Date);

@NotNull
@Override
public Converter<LocalDate, LocalDate> converter() {
return new IdentityConverter<>(LocalDate.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class DatetimeBinding extends AbstractBinding<LocalDateTime, LocalD

private static final int INDEX_TYPE = indexType(PrimitiveType.Datetime);

@NotNull
@Override
public Converter<LocalDateTime, LocalDateTime> converter() {
return new IdentityConverter<>(LocalDateTime.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import java.sql.SQLException;
import java.time.Duration;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
import org.jooq.impl.AbstractBinding;
import org.jooq.types.YearToSecond;
import static tech.ydb.jooq.binding.BindingTools.indexType;
import tech.ydb.table.values.PrimitiveType;
import tech.ydb.table.values.PrimitiveValue;

import java.sql.SQLException;
import java.time.Duration;

import static tech.ydb.jooq.binding.BindingTools.indexType;

@SuppressWarnings("resource")
public final class IntervalBinding extends AbstractBinding<YearToSecond, Duration> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Interval);

@NotNull

@Override
public Converter<YearToSecond, Duration> converter() {
return new IntervalConverter();
Expand Down Expand Up @@ -51,13 +48,11 @@ public YearToSecond to(Duration userObject) {
return YearToSecond.valueOf(userObject);
}

@NotNull
@Override
public Class<YearToSecond> fromType() {
return YearToSecond.class;
}

@NotNull
@Override
public Class<Duration> toType() {
return Duration.class;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class JsonBinding extends AbstractBinding<JSON, JSON> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Json);

@NotNull
@Override
public Converter<JSON, JSON> converter() {
return new IdentityConverter<>(JSON.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import java.sql.SQLException;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
import org.jooq.JSONB;
import org.jooq.impl.AbstractBinding;
import org.jooq.impl.IdentityConverter;
import static tech.ydb.jooq.binding.BindingTools.indexType;
import tech.ydb.table.values.PrimitiveType;
import tech.ydb.table.values.PrimitiveValue;

import java.sql.SQLException;

import static tech.ydb.jooq.binding.BindingTools.indexType;

@SuppressWarnings("resource")
public final class JsonDocumentBinding extends AbstractBinding<JSONB, JSONB> {

private static final int INDEX_TYPE = indexType(PrimitiveType.JsonDocument);

@NotNull
@Override
public Converter<JSONB, JSONB> converter() {
return new IdentityConverter<>(JSONB.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import java.sql.SQLException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
import org.jooq.impl.AbstractBinding;
import static tech.ydb.jooq.binding.BindingTools.indexType;
import tech.ydb.table.values.PrimitiveType;
import tech.ydb.table.values.PrimitiveValue;

import java.sql.SQLException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import static tech.ydb.jooq.binding.BindingTools.indexType;

@SuppressWarnings("resource")
public final class TimestampBinding extends AbstractBinding<LocalDateTime, Instant> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Timestamp);

@NotNull
@Override
public Converter<LocalDateTime, Instant> converter() {
return new TimestampConverter();
Expand Down Expand Up @@ -52,13 +48,11 @@ public LocalDateTime to(Instant userObject) {
return LocalDateTime.ofInstant(userObject, ZoneOffset.UTC);
}

@NotNull
@Override
public Class<LocalDateTime> fromType() {
return LocalDateTime.class;
}

@NotNull
@Override
public Class<Instant> toType() {
return Instant.class;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class TzDateBinding extends AbstractBinding<ZonedDateTime, ZonedDat

private static final int INDEX_TYPE = indexType(PrimitiveType.TzDate);

@NotNull
@Override
public Converter<ZonedDateTime, ZonedDateTime> converter() {
return new IdentityConverter<>(ZonedDateTime.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class TzDatetimeBinding extends AbstractBinding<ZonedDateTime, Zone

private static final int INDEX_TYPE = indexType(PrimitiveType.TzDatetime);

@NotNull
@Override
public Converter<ZonedDateTime, ZonedDateTime> converter() {
return new IdentityConverter<>(ZonedDateTime.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import java.sql.SQLException;
import java.time.ZonedDateTime;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
import org.jooq.impl.AbstractBinding;
import org.jooq.impl.IdentityConverter;
import static tech.ydb.jooq.binding.BindingTools.indexType;
import tech.ydb.table.values.PrimitiveType;
import tech.ydb.table.values.PrimitiveValue;

import java.sql.SQLException;
import java.time.ZonedDateTime;

import static tech.ydb.jooq.binding.BindingTools.indexType;

@SuppressWarnings("resource")
public final class TzTimestampBinding extends AbstractBinding<ZonedDateTime, ZonedDateTime> {

private static final int INDEX_TYPE = indexType(PrimitiveType.TzTimestamp);

@NotNull
@Override
public Converter<ZonedDateTime, ZonedDateTime> converter() {
return new IdentityConverter<>(ZonedDateTime.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class Uint16Binding extends AbstractBinding<UShort, UShort> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Uint16);

@NotNull
@Override
public Converter<UShort, UShort> converter() {
return new IdentityConverter<>(UShort.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class Uint32Binding extends AbstractBinding<UInteger, UInteger> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Uint32);

@NotNull
@Override
public Converter<UInteger, UInteger> converter() {
return new IdentityConverter<>(UInteger.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class Uint64Binding extends AbstractBinding<ULong, ULong> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Uint64);

@NotNull
@Override
public Converter<ULong, ULong> converter() {
return new IdentityConverter<>(ULong.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -19,7 +18,6 @@ public final class Uint8Binding extends AbstractBinding<UByte, UByte> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Uint8);

@NotNull
@Override
public Converter<UByte, UByte> converter() {
return new IdentityConverter<>(UByte.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.ydb.jooq.binding;

import org.jetbrains.annotations.NotNull;
import org.jooq.BindingGetResultSetContext;
import org.jooq.BindingSetStatementContext;
import org.jooq.Converter;
Expand All @@ -18,7 +17,6 @@ public final class YsonBinding extends AbstractBinding<Object, YSON> {

private static final int INDEX_TYPE = indexType(PrimitiveType.Yson);

@NotNull
@Override
public Converter<Object, YSON> converter() {
return new YsonConverter();
Expand Down Expand Up @@ -50,13 +48,12 @@ public Object to(YSON userObject) {
return userObject;
}

@NotNull

@Override
public Class<Object> fromType() {
return Object.class;
}

@NotNull
@Override
public Class<YSON> toType() {
return YSON.class;
Expand Down
Loading