Skip to content

Commit 038c0d3

Browse files
committed
Merge branch 'master' of github.com:zinal/ydb-jdbc-driver
2 parents bf22278 + 62552e4 commit 038c0d3

File tree

76 files changed

+3179
-1121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3179
-1121
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
prepare:
1414
name: Prepare Maven cache
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1616

1717
env:
1818
MAVEN_ARGS: --batch-mode -Dstyle.color=always
@@ -33,7 +33,7 @@ jobs:
3333

3434
build:
3535
name: Build JDBC Driver
36-
runs-on: ubuntu-latest
36+
runs-on: ubuntu-24.04
3737
needs: prepare
3838

3939
strategy:
@@ -103,7 +103,7 @@ jobs:
103103
coverage:
104104
if: github.repository == 'ydb-platform/ydb-jdbc-driver'
105105
name: Coverage JDBC Driver
106-
runs-on: ubuntu-latest
106+
runs-on: ubuntu-24.04
107107
needs: build
108108

109109
env:

.github/workflows/ci.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
prepare:
1313
name: Prepare Maven cache
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515

1616
env:
1717
MAVEN_ARGS: --batch-mode -Dstyle.color=always
@@ -47,7 +47,7 @@ jobs:
4747

4848
build:
4949
name: YDB JDBC Driver CI on JDK
50-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-24.04
5151
needs: prepare
5252

5353
strategy:
@@ -75,8 +75,10 @@ jobs:
7575
- name: Extract YDB JDBC Driver version
7676
working-directory: ./jdbc
7777
run: |
78-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
79-
echo "JDBC_VERSION=$VERSION" >> "$GITHUB_ENV"
78+
JDBC_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
79+
SDK_VERSION=$(mvn help:evaluate -Dexpression=ydb.sdk.version -q -DforceStdout)
80+
echo "JDBC_VERSION=$JDBC_VERSION" >> "$GITHUB_ENV"
81+
echo "SDK_VERSION=$SDK_VERSION" >> "$GITHUB_ENV"
8082
8183
- name: Build YDB JDBC Driver
8284
working-directory: ./jdbc
@@ -90,4 +92,4 @@ jobs:
9092

9193
- name: Test examples with Maven
9294
working-directory: ./examples
93-
run: mvn $MAVEN_ARGS -Dydb.jdbc.version=$JDBC_VERSION test
95+
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION -Dydb.jdbc.version=$JDBC_VERSION test

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
validate:
1010
name: Validate YDB JDBC Driver
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212

1313
steps:
1414
- name: Checkout
@@ -52,7 +52,7 @@ jobs:
5252

5353
publish:
5454
name: Publish YDB JDBC Driver
55-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
5656
needs: validate
5757

5858
env:

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## 2.3.10 ##
2+
3+
* Added .metadata folder to system tables
4+
* Added support of GRANT/REVOKE keywords
5+
6+
## 2.3.9 ##
7+
8+
* Added option 'forceJdbcParameters' to detect ? in whole query text
9+
* Added option 'tokenProvider' to use custom auth provider
10+
* Upgrade to Java SDK 2.3.13
11+
12+
## 2.3.8 ##
13+
14+
* Added option 'grpcCompression'
15+
* Added bulk upsert validation
16+
* All grpc calls isolated from parent context
17+
18+
## 2.3.7 ##
19+
20+
* Added slf4j-to-jul to shaded jar
21+
* Upgrade to use Java SDK v2.3.8
22+
23+
## 2.3.6 ##
24+
25+
* Added jdbc_table which can be converted to AS_TABLE($list)
26+
127
## 2.3.5 ##
228

329
* Disabled stream reader sets for SCAN queries

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Specify the YDB JDBC driver in the dependencies:
2626
<dependency>
2727
<groupId>tech.ydb.jdbc</groupId>
2828
<artifactId>ydb-jdbc-driver</artifactId>
29-
<version>2.3.5</version>
29+
<version>2.3.10</version>
3030
</dependency>
3131

3232
<!-- Shaded version with included dependencies -->
3333
<dependency>
3434
<groupId>tech.ydb.jdbc</groupId>
3535
<artifactId>ydb-jdbc-driver-shaded</artifactId>
36-
<version>2.3.5</version>
36+
<version>2.3.10</version>
3737
</dependency>
3838
</dependencies>
3939
```

jdbc-shaded/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>tech.ydb.jdbc</groupId>
88
<artifactId>ydb-jdbc-driver-parent</artifactId>
9-
<version>2.3.6-SNAPSHOT</version>
9+
<version>2.3.11-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>ydb-jdbc-driver-shaded</artifactId>
@@ -19,6 +19,11 @@
1919
<groupId>tech.ydb.jdbc</groupId>
2020
<artifactId>ydb-jdbc-driver</artifactId>
2121
</dependency>
22+
23+
<dependency>
24+
<groupId>org.slf4j</groupId>
25+
<artifactId>slf4j-jdk14</artifactId>
26+
</dependency>
2227
</dependencies>
2328

2429
<build>
@@ -117,6 +122,12 @@
117122
<exclude>META-INF/*.RSA</exclude>
118123
</excludes>
119124
</filter>
125+
<filter>
126+
<artifact>org.slf4j:slf4j-api</artifact>
127+
<excludes>
128+
<exclude>org/slf4j/impl/**</exclude>
129+
</excludes>
130+
</filter>
120131
</filters>
121132

122133
<relocations>

jdbc/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>tech.ydb.jdbc</groupId>
88
<artifactId>ydb-jdbc-driver-parent</artifactId>
9-
<version>2.3.6-SNAPSHOT</version>
9+
<version>2.3.11-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>ydb-jdbc-driver</artifactId>
@@ -77,7 +77,6 @@
7777
<environmentVariables>
7878
<TESTCONTAINERS_REUSE_ENABLE>true</TESTCONTAINERS_REUSE_ENABLE>
7979
<YDB_DOCKER_IMAGE>ydbplatform/local-ydb:trunk</YDB_DOCKER_IMAGE>
80-
<YDB_DOCKER_FEATURE_FLAGS>enable_parameterized_decimal</YDB_DOCKER_FEATURE_FLAGS>
8180
</environmentVariables>
8281
<systemPropertyVariables>
8382
<java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>

jdbc/src/main/java/tech/ydb/jdbc/common/ColumnInfo.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@ public class ColumnInfo {
1919
private final boolean isNumber;
2020
private final boolean isNull;
2121

22-
public ColumnInfo(String name, Type type) {
22+
public ColumnInfo(String name, TypeDescription type) {
2323
this.name = name;
2424

25-
TypeDescription desc = TypeDescription.of(type);
26-
this.sqlType = desc.sqlType();
27-
this.getters = desc.getters();
28-
this.isOptional = desc.isOptional();
29-
this.ydbType = desc.ydbType();
25+
this.sqlType = type.sqlType();
26+
this.getters = type.getters();
27+
this.isOptional = type.isOptional();
28+
this.ydbType = type.ydbType();
3029

31-
this.isTimestamp = ydbType == PrimitiveType.Timestamp;
30+
this.isTimestamp = ydbType == PrimitiveType.Timestamp || ydbType == PrimitiveType.Timestamp64;
3231
this.isNumber = ydbType == PrimitiveType.Int8 || ydbType == PrimitiveType.Uint8
3332
|| ydbType == PrimitiveType.Int16 || ydbType == PrimitiveType.Uint16
3433
|| ydbType == PrimitiveType.Int32 || ydbType == PrimitiveType.Uint32
@@ -68,10 +67,11 @@ public MappingGetters.Getters getGetters() {
6867
return this.getters;
6968
}
7069

71-
public static ColumnInfo[] fromResultSetReader(ResultSetReader rsr) {
70+
public static ColumnInfo[] fromResultSetReader(YdbTypes types, ResultSetReader rsr) {
7271
ColumnInfo[] columns = new ColumnInfo[rsr.getColumnCount()];
7372
for (int idx = 0; idx < rsr.getColumnCount(); idx += 1) {
74-
columns[idx] = new ColumnInfo(rsr.getColumnName(idx), rsr.getColumnType(idx));
73+
TypeDescription type = types.find(rsr.getColumnType(idx));
74+
columns[idx] = new ColumnInfo(rsr.getColumnName(idx), type);
7575
}
7676
return columns;
7777
}

jdbc/src/main/java/tech/ydb/jdbc/common/FixedResultSetFactory.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,22 @@ public Duration getInterval() {
317317
return value.getInterval();
318318
}
319319

320+
public LocalDate getDate32() {
321+
throw new UnsupportedOperationException("Not supported yet.");
322+
}
323+
324+
public LocalDateTime getDatetime64() {
325+
throw new UnsupportedOperationException("Not supported yet.");
326+
}
327+
328+
public Instant getTimestamp64() {
329+
throw new UnsupportedOperationException("Not supported yet.");
330+
}
331+
332+
public Duration getInterval64() {
333+
throw new UnsupportedOperationException("Not supported yet.");
334+
}
335+
320336
@Override
321337
public ZonedDateTime getTzDate() {
322338
return value.getTzDate();

0 commit comments

Comments
 (0)