Skip to content

Commit 23ad603

Browse files
authored
feat: support blob and decimal in parameter binding (#310)
Closes: feat/6662931308
1 parent 020c003 commit 23ad603

29 files changed

Lines changed: 2410 additions & 991 deletions

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
matrix:
2929
os: [ Ubuntu-22.04 ]
30-
java: [ 8 ]
30+
java: [ 8, 11, 17 ]
3131
maven: [ '3.6.3' ]
3232
runs-on: ${{ matrix.os }}
3333
steps:
@@ -240,6 +240,7 @@ jobs:
240240
run: mvn -B clean verify --file pom.xml
241241

242242
- name: Upload coverage to Codecov
243+
if: matrix.java == 8
243244
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
244245
with:
245246
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/compatibility-3360.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
TDENGINE_USER: ${{ secrets.TDENGINE_USER }}
7777
TDENGINE_PASSWORD: ${{ secrets.TDENGINE_PASSWORD }}
7878
TD_3360_TEST: 'true'
79-
run: mvn -B clean verify --file pom.xml
79+
run: mvn -B clean verify --file pom.xml -Dcoverage.minimum=0.5
8080
- name: Upload logs on failure
8181
if: failure()
8282
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10-
**Full Changelog**: [3.7.8...](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.8...)
10+
**Full Changelog**: [3.8.0...](https://github.com/taosdata/taos-connector-jdbc/compare/3.8.0...)
11+
12+
### Features
13+
14+
15+
- Add dependency check actions (#307) ([2811a31](https://github.com/taosdata/taos-connector-jdbc/commit/2811a318fdc9f01ca3f5265b3f0c1768c5f58c11))
16+
- Feat: support blob and decimal in parameter binding
17+
Closes: feat/6662931308 ([9e9c2f0](https://github.com/taosdata/taos-connector-jdbc/commit/9e9c2f0146fb539adf93d79254172075ac47794c))
18+
19+
20+
## [3.8.0] - 2025-12-31
21+
22+
**Full Changelog**: [3.7.9...3.8.0](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.9...3.8.0)
23+
24+
### Bug Fixes
25+
26+
27+
- Fix sonar error and security issues (#295) ([ca06cee](https://github.com/taosdata/taos-connector-jdbc/commit/ca06cee9fab9e5cfdbb456c106d49869e31822ec))
28+
- Error info contains password (#301) ([1746ee8](https://github.com/taosdata/taos-connector-jdbc/commit/1746ee8e1588cfc1dc42c0cb2c6c013a25be1f88))
29+
30+
31+
### Features
32+
33+
34+
- Report connector version when connecting. (#298) ([76e8c7b](https://github.com/taosdata/taos-connector-jdbc/commit/76e8c7b0b56b8e69ffc0fa19662cd78655834c2d))
35+
- Support token (#302) ([9d14c50](https://github.com/taosdata/taos-connector-jdbc/commit/9d14c50ac411ba3cb65122a5225ee374a18c5520))
36+
37+
38+
## [3.7.9] - 2025-12-06
39+
40+
**Full Changelog**: [3.7.8...3.7.9](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.8...3.7.9)
41+
42+
### Bug Fixes
43+
44+
45+
- Websocket reconnect null point error (#296) ([b0a3738](https://github.com/taosdata/taos-connector-jdbc/commit/b0a3738138af99e8e20df060fc4f0f250f080fa5))
46+
1147

1248
### Features
1349

cliff.toml

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,203 @@ body = """
5858

5959

6060
footer = """
61+
## [3.8.0] - 2025-12-31
62+
63+
**Full Changelog**: [3.7.9...3.8.0](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.9...3.8.0)
64+
65+
### Bug Fixes
66+
67+
68+
- Fix sonar error and security issues (#295) ([ca06cee](https://github.com/taosdata/taos-connector-jdbc/commit/ca06cee9fab9e5cfdbb456c106d49869e31822ec))
69+
- Error info contains password (#301) ([1746ee8](https://github.com/taosdata/taos-connector-jdbc/commit/1746ee8e1588cfc1dc42c0cb2c6c013a25be1f88))
70+
71+
72+
### Features
73+
74+
75+
- Report connector version when connecting. (#298) ([76e8c7b](https://github.com/taosdata/taos-connector-jdbc/commit/76e8c7b0b56b8e69ffc0fa19662cd78655834c2d))
76+
- Support token (#302) ([9d14c50](https://github.com/taosdata/taos-connector-jdbc/commit/9d14c50ac411ba3cb65122a5225ee374a18c5520))
77+
78+
79+
## [3.7.9] - 2025-12-06
80+
81+
**Full Changelog**: [3.7.8...3.7.9](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.8...3.7.9)
82+
83+
### Bug Fixes
84+
85+
86+
- Websocket reconnect null point error (#296) ([b0a3738](https://github.com/taosdata/taos-connector-jdbc/commit/b0a3738138af99e8e20df060fc4f0f250f080fa5))
87+
88+
89+
### Features
90+
91+
92+
- Optimize the load balancing logic to achieve rebalancing after node failure recovery. (#291) ([9c473bc](https://github.com/taosdata/taos-connector-jdbc/commit/9c473bccc699ddba33316efa313da2230143ac34))
93+
94+
95+
## [3.7.8] - 2025-11-20
96+
97+
**Full Changelog**: [3.7.7...3.7.8](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.7...3.7.8)
98+
99+
### Bug Fixes
100+
101+
102+
- Fix getTables need identifier quote string bug. (#292) ([ce5651d](https://github.com/taosdata/taos-connector-jdbc/commit/ce5651d31c87174c06ba567b9a1596c54a6c288b))
103+
104+
105+
## [3.7.7] - 2025-11-13
106+
107+
**Full Changelog**: [3.7.6...3.7.7](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.6...3.7.7)
108+
109+
### Bug Fixes
110+
111+
112+
- Load properties issue in windows (#289) ([b6841d7](https://github.com/taosdata/taos-connector-jdbc/commit/b6841d726f9520556ddf069a5e0aea95af3be876))
113+
- WebSocket statement timeout setting resets transport's timeout (#290) ([c9792c0](https://github.com/taosdata/taos-connector-jdbc/commit/c9792c0eea77e9978ff29bf64c55b823d0c0755f))
114+
115+
116+
## [3.7.6] - 2025-10-17
117+
118+
**Full Changelog**: [3.7.5...3.7.6](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.5...3.7.6)
119+
120+
### Features
121+
122+
123+
- Improve stmt setObject and loadbalance (#284) ([84721c5](https://github.com/taosdata/taos-connector-jdbc/commit/84721c585c1863d2da9e127b248b0c383b39c318))
124+
125+
126+
## [3.7.5] - 2025-09-29
127+
128+
**Full Changelog**: [3.7.4...3.7.5](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.4...3.7.5)
129+
130+
### Features
131+
132+
133+
- JDBC URL supports multiple endpoints (#279) ([fe1090d](https://github.com/taosdata/taos-connector-jdbc/commit/fe1090dd42afb78d5f7558d879896afc4a699f3b))
134+
- Stmt supports reconnection (#280) ([87f27e8](https://github.com/taosdata/taos-connector-jdbc/commit/87f27e8214b84db827bbd3a75d1c2a5f85c131d0))
135+
136+
137+
### Performance
138+
139+
140+
- Improve writing efficiency in efficient writing mode by serializing data with a separate thread (#278) ([bf8e615](https://github.com/taosdata/taos-connector-jdbc/commit/bf8e615bf4f6328efc96aebc1c84cbcdabf8a994))
141+
- Improve isValid performace (#281) ([67edba7](https://github.com/taosdata/taos-connector-jdbc/commit/67edba7b608115cd92a2bbd2107a295535ba714f))
142+
143+
144+
## [3.7.4] - 2025-09-05
145+
146+
**Full Changelog**: [3.7.3...3.7.4](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.3...3.7.4)
147+
148+
### Features
149+
150+
151+
- Stop using regex pattern to escape single quota (#275) ([c4b41ff](https://github.com/taosdata/taos-connector-jdbc/commit/c4b41ff34c63f9c3f61edc5c63ea2225e0dfbcc9))
152+
- Supports delete meta subscription (#277) ([13e51e0](https://github.com/taosdata/taos-connector-jdbc/commit/13e51e0dba6419ea0747268ff305cc3df2a05b8a))
153+
154+
155+
## [3.7.3] - 2025-08-20
156+
157+
**Full Changelog**: [3.7.2...3.7.3](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.2...3.7.3)
158+
159+
### Performance
160+
161+
162+
- Improve native query performance (#274) ([68df9e5](https://github.com/taosdata/taos-connector-jdbc/commit/68df9e56174e087406f79213f5c8364e5e436332))
163+
164+
165+
## [3.7.2] - 2025-08-12
166+
167+
**Full Changelog**: [3.7.1...3.7.2](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.1...3.7.2)
168+
169+
### Bug Fixes
170+
171+
172+
- Fix spring jdbc template perf bug (#273) ([180ba59](https://github.com/taosdata/taos-connector-jdbc/commit/180ba59e0aa7793a85db8d1cc332722f324b0b9d))
173+
174+
175+
## [3.7.1] - 2025-07-27
176+
177+
**Full Changelog**: [3.7.0...3.7.1](https://github.com/taosdata/taos-connector-jdbc/compare/3.7.0...3.7.1)
178+
179+
### Bug Fixes
180+
181+
182+
- Set varbinary/geometry compatibility issue (#271) ([157c4ec](https://github.com/taosdata/taos-connector-jdbc/commit/157c4ec13057e867a64dfcd5ec52e014ad4db912))
183+
184+
185+
## [3.7.0] - 2025-07-26
186+
187+
**Full Changelog**: [3.6.3...3.7.0](https://github.com/taosdata/taos-connector-jdbc/compare/3.6.3...3.7.0)
188+
189+
### Bug Fixes
190+
191+
192+
- Deadlock when binding a wrong type in efficient writing (#252) ([7684a5c](https://github.com/taosdata/taos-connector-jdbc/commit/7684a5c6005fa330a4800bda2124f27150a18779))
193+
- GetPrimaryKeys return null (#260) ([3ecc754](https://github.com/taosdata/taos-connector-jdbc/commit/3ecc75459078f5ed3bbdde29ccfaa1cf4306b938))
194+
- Set timezone 'Asia/Shanghai' bug (#261) ([8e5b840](https://github.com/taosdata/taos-connector-jdbc/commit/8e5b84084afaa4f9d937bce46e3ddf2d4032c3b9))
195+
- Deploy pom slf4j dependency ([52e0961](https://github.com/taosdata/taos-connector-jdbc/commit/52e0961b97d3cba102479b33ad0bd8bf6fbf1989))
196+
197+
198+
### Documentation
199+
200+
201+
- Add change log file (#251) ([3f1fdad](https://github.com/taosdata/taos-connector-jdbc/commit/3f1fdadad9d946b5ca21f29a9b35bda8dd84534a))
202+
203+
204+
### Features
205+
206+
207+
- Replace websocket lib to netty, support stmt line bind mode. (#253) ([c84fd78](https://github.com/taosdata/taos-connector-jdbc/commit/c84fd78d647780d54b35b0f123bf062b95ea5803))
208+
- Support ipv6 (#254) ([2f56e61](https://github.com/taosdata/taos-connector-jdbc/commit/2f56e615c782d5bfe4d4ea316cd051d1cff8fde7))
209+
- Supports varchar as string on websocket connections (#255) ([816e782](https://github.com/taosdata/taos-connector-jdbc/commit/816e782ed85825bcb216c51888291014862bfffe))
210+
- Supports version compatibility checks for TDengine (#256) ([7c405cd](https://github.com/taosdata/taos-connector-jdbc/commit/7c405cd35ae848c17dde05bcfbe0668824cc32f7))
211+
- Support blob data type (#259) ([bb47387](https://github.com/taosdata/taos-connector-jdbc/commit/bb47387dcc7a2c5a60838bf7b9e5bab97e974c41))
212+
213+
214+
## [3.6.3] - 2025-05-19
215+
216+
**Full Changelog**: [3.6.2...3.6.3](https://github.com/taosdata/taos-connector-jdbc/compare/3.6.2...3.6.3)
217+
218+
### Bug Fixes
219+
220+
221+
- Database subscription data type conversion bug (#250) ([2ead789](https://github.com/taosdata/taos-connector-jdbc/commit/2ead789a94065463795c8dd45a5d9660228bd9d6))
222+
223+
224+
## [3.6.2] - 2025-04-25
225+
226+
**Full Changelog**: [3.6.1...3.6.2](https://github.com/taosdata/taos-connector-jdbc/compare/3.6.1...3.6.2)
227+
228+
### Bug Fixes
229+
230+
231+
- Fix ci bug ([2406065](https://github.com/taosdata/taos-connector-jdbc/commit/24060656fafdfbd1539043d61bb60e151fd49b17))
232+
- Cloud tmq subscribe bug (#249) ([196b609](https://github.com/taosdata/taos-connector-jdbc/commit/196b6097e237fcb15bf881623836f07ca33b00c2))
233+
234+
235+
## [3.6.1] - 2025-04-15
236+
237+
**Full Changelog**: [3.6.0...3.6.1](https://github.com/taosdata/taos-connector-jdbc/compare/3.6.0...3.6.1)
238+
239+
### Bug Fixes
240+
241+
242+
- Fix ci error ([fc64c83](https://github.com/taosdata/taos-connector-jdbc/commit/fc64c83c38a452e6868987eb81ce742142cd0958))
243+
- Fix small query perf bug (#247) ([e4e8407](https://github.com/taosdata/taos-connector-jdbc/commit/e4e8407d7e994fc199e93ef5819341eb5d416cb4))
244+
245+
246+
### Enhancements
247+
248+
- *loadLibrary*: Loading dynamic library by adding TD_LIBRARY_PATH, especially when DYLD_LIBRARY_PATH ineffective on MacOS because of SIP ([c99b1f8](c99b1f81f8184e4862d9a91bcf94add5799d9703))
249+
250+
- Add tmq subscribe db data support ([fbb0d23](https://github.com/taosdata/taos-connector-jdbc/commit/fbb0d239b3d50bde6864b43052b074e892feca9e))
251+
252+
253+
### Testing
254+
255+
256+
- Test ci ([c59a577](https://github.com/taosdata/taos-connector-jdbc/commit/c59a577c379a058a542ac764325f5912a348fbda))
257+
61258
## [3.6.0] - 2025-03-26
62259
**Full Changelog**: [3.5.3...3.6.0](https://github.com/taosdata/taos-connector-jdbc/compare/3.5.3...3.6.0)
63260

deploy-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.taosdata.jdbc</groupId>
77
<artifactId>taos-jdbcdriver</artifactId>
8-
<version>3.8.0</version>
8+
<version>3.8.1</version>
99

1010
<packaging>jar</packaging>
1111

pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.taosdata.jdbc</groupId>
55
<artifactId>taos-jdbcdriver</artifactId>
6-
<version>3.8.0</version>
6+
<version>3.8.1</version>
77

88
<packaging>jar</packaging>
99
<name>JDBCDriver</name>
@@ -47,6 +47,7 @@
4747
<byte-buddy.version>1.12.22</byte-buddy.version>
4848
<slf4j.version>2.0.17</slf4j.version>
4949
<logback.version>1.3.16</logback.version>
50+
<coverage.minimum>0.80</coverage.minimum>
5051
</properties>
5152
<dependencies>
5253
<dependency>
@@ -155,6 +156,9 @@
155156
<artifactId>jacoco-maven-plugin</artifactId>
156157
<version>0.8.12</version>
157158
<configuration>
159+
<excludes>
160+
<exclude>io/netty/**/*</exclude>
161+
</excludes>
158162
<outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
159163
</configuration>
160164
<executions>
@@ -188,7 +192,7 @@
188192
<limit>
189193
<counter>INSTRUCTION</counter>
190194
<value>COVEREDRATIO</value>
191-
<minimum>0.80</minimum>
195+
<minimum>${coverage.minimum}</minimum>
192196
</limit>
193197
</limits>
194198
</rule>

src/main/java/com/taosdata/jdbc/TSDBPreparedStatement.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ public void setBigInteger(int columnIndex, List<BigInteger> list) throws SQLExce
575575
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
576576
}
577577

578+
@Override
579+
public void setBigDecimal(int columnIndex, List<BigDecimal> list) throws SQLException{
580+
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
581+
}
578582
@Override
579583
public void setDouble(int columnIndex, List<Double> list) throws SQLException {
580584
setValueImpl(columnIndex, list, TSDBConstants.TSDB_DATA_TYPE_DOUBLE, Double.BYTES);

src/main/java/com/taosdata/jdbc/TableVGroupID.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/main/java/com/taosdata/jdbc/TaosPrepareStatement.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.taosdata.jdbc;
22

3+
import java.math.BigDecimal;
34
import java.math.BigInteger;
45
import java.sql.Blob;
56
import java.sql.PreparedStatement;
@@ -47,6 +48,7 @@ public interface TaosPrepareStatement extends PreparedStatement {
4748

4849
void setLong(int columnIndex, List<Long> list) throws SQLException;
4950
void setBigInteger(int columnIndex, List<BigInteger> list) throws SQLException;
51+
void setBigDecimal(int columnIndex, List<BigDecimal> list) throws SQLException;
5052

5153
void setDouble(int columnIndex, List<Double> list) throws SQLException;
5254

src/main/java/com/taosdata/jdbc/common/ColumnInfo.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ public class ColumnInfo implements Comparable<ColumnInfo> {
77
// taos data type
88
private final int type;
99
private final int index;
10-
11-
12-
1310
private int serializeSize;
1411

1512
public ColumnInfo(int columnIndex, List<Object> dataList, int type) {

0 commit comments

Comments
 (0)