1
mirror of https://github.com/CarmJos/EasySQL.git synced 2026-06-05 09:01:26 +08:00

Compare commits

...

181 Commits

Author SHA1 Message Date
dependabot[bot] b81b057954 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.4 to 3.5.5.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.4...surefire-3.5.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 08:05:53 +08:00
renovate[bot] fab4c12d2a chore(deps): update actions/upload-artifact action to v7 2026-03-10 08:05:45 +08:00
dependabot[bot] eef5b65529 chore(deps): bump com.github.chris2018998:beecp from 5.2.1 to 5.2.2
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-5.2.1...BeeCP-5.2.2)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-version: 5.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 08:05:24 +08:00
dependabot[bot] cec10c7069 chore(deps): bump org.apache.maven.plugins:maven-shade-plugin
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.6.1...maven-shade-plugin-3.6.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-version: 3.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 08:04:03 +08:00
renovate[bot] 89f342d398 chore(deps): update actions/upload-artifact action to v6 2026-02-21 00:58:08 +08:00
dependabot[bot] 1a63c8ef13 chore(deps): bump org.apache.maven.plugins:maven-release-plugin
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.2.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.2.0...maven-release-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-version: 3.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 00:57:54 +08:00
renovate[bot] 527d21a546 fix(deps): update dependency org.apache.logging.log4j:log4j-core to v2.25.3 [security] 2026-02-21 00:57:27 +08:00
dependabot[bot] 78c7007d3c chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.1 to 3.15.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.1...maven-compiler-plugin-3.15.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 00:57:14 +08:00
dependabot[bot] c1f80562d5 chore(deps): bump com.github.chris2018998:beecp from 5.1.2 to 5.2.1
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 5.1.2 to 5.2.1.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-5.1.2...BeeCP-5.2.1)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-version: 5.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 00:57:07 +08:00
dependabot[bot] 1d09d31dc6 chore(deps): bump org.jetbrains:annotations from 26.0.2-1 to 26.1.0
Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 26.0.2-1 to 26.1.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/26.0.2-1...26.1.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-version: 26.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 00:56:53 +08:00
renovate[bot] e27579cdf5 chore(deps): update actions/upload-artifact action to v5 2025-12-01 09:32:41 +08:00
dependabot[bot] 82c33951e7 chore(deps): bump org.apache.maven.plugins:maven-release-plugin
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.1.1...maven-release-3.2.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 09:32:24 +08:00
renovate[bot] 4676a1d398 chore(deps): update codacy/codacy-analysis-cli-action digest to 30783d0 2025-12-01 09:32:17 +08:00
dependabot[bot] 1688e39ef0 chore(deps): bump com.github.chris2018998:beecp from 5.0.0 to 5.1.2
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 5.0.0 to 5.1.2.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-5.0.0...BeeCP-5.1.2)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-version: 5.1.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 09:32:04 +08:00
dependabot[bot] 8e449b6176 chore(deps): bump org.apache.maven.plugins:maven-jar-plugin
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.2 to 3.5.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.2...maven-jar-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 09:31:58 +08:00
renovate[bot] bf0f0551a2 chore(deps): update actions/checkout action to v6 2025-12-01 09:31:51 +08:00
renovate[bot] 65345a7a1b chore(deps): update dependency org.apache.maven.plugins:maven-source-plugin to v3.4.0 2025-12-01 09:31:46 +08:00
dependabot[bot] f7df739ac5 chore(deps): bump com.h2database:h2 from 2.3.232 to 2.4.240
Bumps [com.h2database:h2](https://github.com/h2database/h2database) from 2.3.232 to 2.4.240.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.3.232...version-2.4.240)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-version: 2.4.240
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 10:37:05 +08:00
renovate[bot] c2b0548e52 chore(deps): update github/codeql-action action to v4 2025-10-23 10:36:59 +08:00
dependabot[bot] c2019c042f chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.3...maven-javadoc-plugin-3.12.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-version: 3.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 09:19:43 +08:00
dependabot[bot] a66af730df chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.0 to 3.14.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 09:19:31 +08:00
dependabot[bot] 4cdd8f5450 chore(deps): bump log4j.version from 2.25.1 to 2.25.2
Bumps `log4j.version` from 2.25.1 to 2.25.2.

Updates `org.apache.logging.log4j:log4j-api` from 2.25.1 to 2.25.2

Updates `org.apache.logging.log4j:log4j-core` from 2.25.1 to 2.25.2

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.25.1 to 2.25.2

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-version: 2.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 09:19:25 +08:00
renovate[bot] 277023ba85 chore(deps): update dependency org.apache.maven.plugins:maven-shade-plugin to v3.6.1 2025-09-14 16:56:47 +08:00
renovate[bot] f7fe8de499 chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.4 2025-09-14 16:56:40 +08:00
renovate[bot] 2d7cf72192 fix(deps): update dependency org.jetbrains:annotations to v26.0.2-1 2025-09-06 10:08:49 +08:00
dependabot[bot] 10f2a22c21 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.7 to 3.2.8.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.7...maven-gpg-plugin-3.2.8)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-version: 3.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 23:44:17 +08:00
dependabot[bot] c2a42fb2c3 chore(deps): bump log4j.version from 2.25.0 to 2.25.1
Bumps `log4j.version` from 2.25.0 to 2.25.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.25.0 to 2.25.1

Updates `org.apache.logging.log4j:log4j-core` from 2.25.0 to 2.25.1

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.25.0 to 2.25.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 23:44:02 +08:00
renovate[bot] 6a7ad4ebdf chore(deps): update codacy/codacy-analysis-cli-action digest to d28ce58 2025-08-21 23:43:55 +08:00
dependabot[bot] c39309768b chore(deps): bump com.github.chris2018998:beecp from 4.2.0 to 5.0.0
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.2.0 to 5.0.0.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/commits)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 23:43:31 +08:00
renovate[bot] 94208847e4 fix(deps): update dependency com.zaxxer:hikaricp to v7 2025-08-21 23:43:21 +08:00
renovate[bot] 8005c3147d chore(deps): update actions/checkout action to v5 2025-08-21 23:43:02 +08:00
dependabot[bot] b38658e2f2 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.2...maven-javadoc-plugin-3.11.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-version: 3.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 23:42:49 +08:00
renovate[bot] e11803477a chore(deps): update actions/setup-java action to v5 2025-08-21 23:42:42 +08:00
dependabot[bot] bb096cc41a chore(deps): bump log4j.version from 2.24.3 to 2.25.0
Bumps `log4j.version` from 2.24.3 to 2.25.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.3 to 2.25.0

Updates `org.apache.logging.log4j:log4j-core` from 2.24.3 to 2.25.0

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.24.3 to 2.25.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-25 06:29:21 +08:00
renovate[bot] 47f1b7b8ab fix(deps): update dependency com.zaxxer:hikaricp to v6.3.0 2025-04-18 10:55:48 +08:00
dependabot[bot] e7cecfe229 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 10:55:37 +08:00
dependabot[bot] 794a024d3b chore(deps): bump com.github.chris2018998:beecp from 4.1.8 to 4.2.0
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.1.8 to 4.2.0.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.1.8...BeeCP-4.2.0)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 10:55:32 +08:00
dependabot[bot] 82eaf9361e chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.13.0 to 3.14.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-12 04:40:19 +08:00
renovate[bot] 94d85d3949 fix(deps): update dependency org.slf4j:slf4j-api to v2.0.17 2025-03-12 04:40:15 +08:00
renovate[bot] cd1bfeb926 chore(deps): update dependency com.github.chris2018998:beecp to v4.1.8 2025-02-09 14:31:29 +08:00
renovate[bot] c008a51d1c chore(deps): update dependency com.github.chris2018998:beecp to v4.1.7 2025-02-06 16:36:45 +08:00
renovate[bot] b1c55efe04 fix(deps): update dependency org.jetbrains:annotations to v26.0.2 2025-01-23 03:46:51 +08:00
renovate[bot] a24b5bd0d2 fix(deps): update dependency org.slf4j:slf4j-api to v2 2025-01-18 13:20:54 +08:00
renovate[bot] 23a3f66e3f chore(deps): update github/codeql-action action to v3 2025-01-18 04:46:16 +08:00
renovate[bot] 5ddbb4f09f fix(deps): update dependency com.zaxxer:hikaricp to v6 2025-01-18 04:46:13 +08:00
renovate[bot] 4abb0152ae chore(deps): update actions/setup-java action to v4 2025-01-18 03:37:31 +08:00
renovate[bot] b652d2b568 chore(deps): update actions/upload-artifact action to v4 2025-01-18 03:37:28 +08:00
renovate[bot] 018fac728f chore(deps): update codacy/codacy-analysis-cli-action digest to 0991600 2025-01-18 03:05:09 +08:00
renovate[bot] 85ae469a01 chore(deps): update actions/checkout action to v4 2025-01-18 03:05:07 +08:00
renovate[bot] 04e3ca4b58 Add renovate.json 2025-01-18 00:08:09 +08:00
dependabot[bot] 38d89dc635 chore(deps): bump com.github.chris2018998:beecp from 4.1.5 to 4.1.6
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.1.5...BeeCP-4.1.6)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 06:14:04 +08:00
dependabot[bot] fd3102d8e7 chore(deps): bump log4j.version from 2.24.2 to 2.24.3
Bumps `log4j.version` from 2.24.2 to 2.24.3.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-core` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.24.2 to 2.24.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 23:22:21 +08:00
dependabot[bot] 4790442361 chore(deps): bump com.github.chris2018998:beecp from 4.1.4 to 4.1.5
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.1.4...BeeCP-4.1.5)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 23:22:09 +08:00
dependabot[bot] e935be299f chore(deps): bump com.github.chris2018998:beecp from 4.1.3 to 4.1.4
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.1.3...BeeCP-4.1.4)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 13:16:09 +08:00
dependabot[bot] 23b2a61f49 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.1 to 3.11.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.1...maven-javadoc-plugin-3.11.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 13:16:03 +08:00
dependabot[bot] 8815ae0da5 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.1...surefire-3.5.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 13:15:53 +08:00
dependabot[bot] 8bcd4ee1b2 chore(deps): bump com.github.chris2018998:beecp from 4.0.7 to 4.1.3
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.7 to 4.1.3.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.7...BeeCP-4.1.3)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 02:30:06 +08:00
dependabot[bot] fe4e35a85c chore(deps): bump log4j.version from 2.24.1 to 2.24.2
Bumps `log4j.version` from 2.24.1 to 2.24.2.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-core` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.24.1 to 2.24.2

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 02:28:53 +08:00
dependabot[bot] e19f05648b chore(deps): bump log4j.version from 2.24.0 to 2.24.1
Bumps `log4j.version` from 2.24.0 to 2.24.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.0 to 2.24.1

Updates `org.apache.logging.log4j:log4j-core` from 2.24.0 to 2.24.1

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.24.0 to 2.24.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 16:43:01 +08:00
dependabot[bot] defd8fa35f chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.6 to 3.2.7.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.6...maven-gpg-plugin-3.2.7)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 16:42:52 +08:00
dependabot[bot] 8e955b31a8 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.0...maven-javadoc-plugin-3.10.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 16:39:53 +08:00
dependabot[bot] 1e5be56417 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.0...surefire-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 16:38:18 +08:00
dependabot[bot] 421e3a17ed chore(deps): bump org.jetbrains:annotations from 25.0.0 to 26.0.1
Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 25.0.0 to 26.0.1.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/25.0.0...26.0.1)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 16:19:40 +08:00
dependabot[bot] 3a441b4b78 chore(deps): bump org.jetbrains:annotations from 24.1.0 to 25.0.0
Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.1.0 to 25.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/24.1.0...25.0.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 21:21:32 +08:00
dependabot[bot] 7ad15e2ac5 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.5...maven-gpg-plugin-3.2.6)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-19 20:05:43 +08:00
dependabot[bot] a107164cbe chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.4...maven-gpg-plugin-3.2.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 22:50:30 +08:00
dependabot[bot] 18d889337e chore(deps): bump com.h2database:h2 from 2.3.230 to 2.3.232
Bumps [com.h2database:h2](https://github.com/h2database/h2database) from 2.3.230 to 2.3.232.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.3.230...version-2.3.232)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 22:50:16 +08:00
dependabot[bot] 4c2a371de2 chore(deps): bump com.github.chris2018998:beecp from 4.0.5 to 4.0.7
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.5 to 4.0.7.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.5...BeeCP-4.0.7)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 22:49:56 +08:00
dependabot[bot] 3a3d56e724 chore(deps): bump log4j.version from 2.23.1 to 2.24.0
Bumps `log4j.version` from 2.23.1 to 2.24.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.0

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.0

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.23.1 to 2.24.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 21:45:08 +08:00
dependabot[bot] fd7ddf5203 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.3.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.1...surefire-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 15:24:25 +08:00
dependabot[bot] 1e51dbca30 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.8.0 to 3.10.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.8.0...maven-javadoc-plugin-3.10.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 15:23:58 +08:00
dependabot[bot] fe8338e293 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.7.0...maven-javadoc-plugin-3.8.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 15:01:43 +08:00
dependabot[bot] 78dcedf71e chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.0...surefire-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 07:01:15 +08:00
dependabot[bot] 3e8ebe6b42 chore(deps): bump com.github.chris2018998:beecp from 4.0.4 to 4.0.5
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.4...BeeCP-4.0.5)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 07:01:07 +08:00
dependabot[bot] f328e823c3 chore(deps): bump com.h2database:h2 from 2.2.224 to 2.3.230
Bumps [com.h2database:h2](https://github.com/h2database/h2database) from 2.2.224 to 2.3.230.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.2.224...version-2.3.230)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 07:00:58 +08:00
dependabot[bot] aba111872f chore(deps): bump org.apache.maven.plugins:maven-release-plugin
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.1.0...maven-release-3.1.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 07:00:07 +08:00
dependabot[bot] cabdbc03c2 chore(deps): bump org.apache.maven.plugins:maven-release-plugin
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.1...maven-release-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-12 00:42:01 +08:00
dependabot[bot] bcb192f28b chore(deps): bump org.apache.maven.plugins:maven-jar-plugin
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.1...maven-jar-plugin-3.4.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-12 00:41:53 +08:00
dependabot[bot] 34201fb827 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.5...surefire-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-12 00:15:29 +08:00
dependabot[bot] a4ca8ad47b chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.3 to 3.7.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.3...maven-javadoc-plugin-3.7.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-04 12:20:36 +08:00
dependabot[bot] 7fe8ea81ba chore(deps): bump org.apache.maven.plugins:maven-shade-plugin
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.3...maven-shade-plugin-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-04 12:20:19 +08:00
dependabot[bot] 8ced3965be chore(deps): bump com.github.chris2018998:beecp from 4.0.3 to 4.0.4
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.3...BeeCP-4.0.4)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 00:36:52 +08:00
dependabot[bot] bb05e8e843 chore(deps): bump org.apache.maven.plugins:maven-shade-plugin
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.2...maven-shade-plugin-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-28 03:56:01 +08:00
dependabot[bot] 7a4d79a308 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.3...maven-gpg-plugin-3.2.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 08:52:36 +08:00
dependabot[bot] 66bf45cf66 chore(deps): bump org.apache.maven.plugins:maven-jar-plugin
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.0...maven-jar-plugin-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 19:36:36 +08:00
dependabot[bot] 5b24f68610 chore(deps): bump org.apache.maven.plugins:maven-jar-plugin
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.3.0...maven-jar-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 16:16:30 +08:00
dependabot[bot] 08f4681fe2 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.2...maven-gpg-plugin-3.2.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 16:13:38 +08:00
dependabot[bot] eb9785be01 chore(deps): bump com.github.chris2018998:beecp from 4.0.2 to 4.0.3
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.2...BeeCP-4.0.3)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 14:35:58 +08:00
dependabot[bot] 3939e18a9a bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.3.1.
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 11:48:38 +08:00
dependabot[bot] 382875471f chore(deps): bump com.github.chris2018998:beecp from 4.0.1 to 4.0.2 (#121)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.1...BeeCP-4.0.2)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 21:25:18 +08:00
dependabot[bot] 1b1e52aa45 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin (#120)
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.1...maven-gpg-plugin-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 09:03:43 +08:00
dependabot[bot] 90144eca5b chore(deps): bump com.github.chris2018998:beecp from 4.0.0 to 4.0.1 (#119)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-4.0.0...BeeCP-4.0.1)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 02:01:48 +08:00
dependabot[bot] 18b62c02d9 chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin (#118)
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 19:02:32 +08:00
dependabot[bot] 40e4ff54b7 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin (#117)
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.0...maven-gpg-plugin-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 20:09:06 +08:00
dependabot[bot] 052b00951a chore(deps): bump log4j.version from 2.23.0 to 2.23.1 (#114)
Bumps `log4j.version` from 2.23.0 to 2.23.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.23.0 to 2.23.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 18:34:48 +08:00
dependabot[bot] 27b204d476 chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin (#115)
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.1.0...maven-gpg-plugin-3.2.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 18:34:42 +08:00
dependabot[bot] 3f460f3fe2 chore(deps): bump com.github.chris2018998:beecp from 3.5.2 to 4.0.0 (#116)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.5.2 to 4.0.0.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Changelog](https://github.com/Chris2018998/beecp/blob/master/CHANGES)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.5.2...BeeCP-4.0.0)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 18:34:35 +08:00
dependabot[bot] 52dcd71c5b chore(deps): bump com.github.chris2018998:beecp from 3.5.1 to 3.5.2 (#113)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/3.5.1...BeeCP-3.5.2)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-05 10:27:31 +08:00
dependabot[bot] 568df8cf0a chore(deps): bump org.apache.maven.plugins:maven-shade-plugin (#112)
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.1...maven-shade-plugin-3.5.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 01:56:13 +08:00
dependabot[bot] 3095bfc99c chore(deps): bump log4j.version from 2.22.1 to 2.23.0 (#111)
Bumps `log4j.version` from 2.22.1 to 2.23.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.22.1 to 2.23.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 01:56:03 +08:00
dependabot[bot] 99897f7cac chore(deps): bump com.github.chris2018998:beecp from 3.5.0 to 3.5.1 (#110)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.5.0...3.5.1)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 23:37:25 +08:00
dependabot[bot] eded188f21 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#109)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.3 to 3.2.5.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.3...surefire-3.2.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 22:34:26 +08:00
dependabot[bot] 10f9623eee chore(deps): bump com.github.chris2018998:beecp from 3.4.4 to 3.5.0 (#107)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.4.4 to 3.5.0.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.4.4...BeeCP-3.5.0)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-04 18:02:20 +08:00
dependabot[bot] 09ce798412 chore(deps): bump log4j.version from 2.22.0 to 2.22.1 (#106)
Bumps `log4j.version` from 2.22.0 to 2.22.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-core` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.22.0 to 2.22.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 17:45:52 +08:00
dependabot[bot] 5b4ca26337 chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin (#105)
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-26 17:06:51 +08:00
dependabot[bot] a1113e2d85 chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin (#104)
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.11.0...maven-compiler-plugin-3.12.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 17:52:13 +08:00
dependabot[bot] 87d352c17e chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#103)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.2...surefire-3.2.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 18:17:43 +08:00
dependabot[bot] 54866cf2a2 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin (#102)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.2...maven-javadoc-plugin-3.6.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 18:25:09 +08:00
dependabot[bot] ed6afd3bc2 chore(deps): bump com.github.chris2018998:beecp from 3.4.2 to 3.4.4 (#101)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.4.2...BeeCP-3.4.4)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 18:24:55 +08:00
dependabot[bot] 6f9eca622f chore(deps): bump log4j.version from 2.21.1 to 2.22.0 (#100)
Bumps `log4j.version` from 2.21.1 to 2.22.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-core` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.21.1 to 2.22.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 17:39:25 +08:00
dependabot[bot] 98045ab1ed chore(deps): bump org.jetbrains:annotations from 24.0.1 to 24.1.0 (#99)
Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.0.1 to 24.1.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/24.0.1...24.1.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 17:55:21 +08:00
dependabot[bot] 6a7ed72e46 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#97)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 19:07:22 +08:00
dependabot[bot] 865b0e0900 chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin (#98)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.0 to 3.6.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.0...maven-javadoc-plugin-3.6.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 19:07:14 +08:00
dependabot[bot] 9ec09ca3c9 chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#95)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 22:50:37 +08:00
dependabot[bot] bd92a65d12 chore(deps): bump log4j.version from 2.21.0 to 2.21.1 (#96)
Bumps `log4j.version` from 2.21.0 to 2.21.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-core` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.21.0 to 2.21.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 22:49:31 +08:00
dependabot[bot] 0a5db8f2f9 chore(deps): bump log4j.version from 2.20.0 to 2.21.0 (#94)
Bumps `log4j.version` from 2.20.0 to 2.21.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-core` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.20.0 to 2.21.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 19:17:51 +08:00
dependabot[bot] 231fe78e49 chore(deps): bump org.apache.maven.plugins:maven-shade-plugin (#93)
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.0...maven-shade-plugin-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 12:48:21 +08:00
dependabot[bot] 5226337764 chore(deps): bump com.h2database:h2 from 2.2.222 to 2.2.224 (#92)
Bumps [com.h2database:h2](https://github.com/h2database/h2database) from 2.2.222 to 2.2.224.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.2.222...version-2.2.224)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 17:18:44 +08:00
dependabot[bot] f72e15424c chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin (#91)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 12:16:20 +08:00
dependabot[bot] ac7d60a727 chore(deps): bump com.h2database:h2 from 2.2.220 to 2.2.222 (#90)
Bumps [com.h2database:h2](https://github.com/h2database/h2database) from 2.2.220 to 2.2.222.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.2.220...version-2.2.222)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 20:20:57 +08:00
Ghost_chu 67a94d8a1f Use utf8mb4 as default charset for table creating (#89) 2023-08-30 00:39:45 +08:00
dependabot[bot] 080ff52329 chore(deps): bump com.github.chris2018998:beecp from 3.4.1 to 3.4.2 (#88)
Bumps [com.github.chris2018998:beecp](https://github.com/Chris2018998/BeeCP) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.4.1...BeeCP-3.4.2)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 20:22:41 +08:00
dependabot[bot] 6cc10ff978 chore(deps): bump h2 from 2.1.214 to 2.2.220 in /demo (#87)
Bumps [h2](https://github.com/h2database/h2database) from 2.1.214 to 2.2.220.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.1.214...version-2.2.220)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 12:33:00 +08:00
dependabot[bot] d05bae485b chore(deps): bump h2 from 2.1.214 to 2.2.220 (#86)
Bumps [h2](https://github.com/h2database/h2database) from 2.1.214 to 2.2.220.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.1.214...version-2.2.220)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 12:32:41 +08:00
dependabot[bot] 344e2a4d27 chore(deps): bump maven-shade-plugin from 3.4.1 to 3.5.0 (#85)
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.1...maven-shade-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 01:34:46 +08:00
dependabot[bot] e43db35303 chore(deps): bump maven-surefire-plugin from 3.1.0 to 3.1.2 (#84)
Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.0...surefire-3.1.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-09 13:37:03 +08:00
dependabot[bot] 27425deb7c chore(deps): bump maven-release-plugin from 3.0.0 to 3.0.1 (#83)
Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0...maven-release-3.0.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 03:44:35 +08:00
dependabot[bot] 2bee7026bf chore(deps): bump maven-source-plugin from 3.2.1 to 3.3.0 (#82)
Bumps [maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.2.1 to 3.3.0.
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.2.1...maven-source-plugin-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 17:18:09 +08:00
dependabot[bot] e7b75520fa chore(deps): bump maven-gpg-plugin from 3.0.1 to 3.1.0 (#81)
Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.0.1 to 3.1.0.
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:54:37 +08:00
dependabot[bot] e7a13bf923 chore(deps): bump maven-gpg-plugin from 3.0.1 to 3.1.0 (#81)
Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.0.1 to 3.1.0.
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:54:12 +08:00
dependabot[bot] 07a28f60d3 chore(deps): bump maven-gpg-plugin from 3.0.1 to 3.1.0 (#81)
Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.0.1 to 3.1.0.
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:53:39 +08:00
dependabot[bot] b231d834fb chore(deps): bump maven-surefire-plugin from 3.0.0 to 3.1.0 (#80)
Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0...surefire-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:52:35 +08:00
dependabot[bot] c48c09ec4f chore(deps): bump beecp from 3.4.0 to 3.4.1 (#79)
Bumps [beecp](https://github.com/Chris2018998/BeeCP) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.4.0...BeeCP-3.4.1)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 02:31:11 +08:00
huanmeng_qwq c677731f6a feat(migrate): 添加对表迁移的操作 (#69)
* DELETE语句缺少AND关键词连接

* feat(migrate): 添加对表迁移的操作

* Update SQLMigrate.java

Co-authored-by: sonatype-lift[bot] <37194012+sonatype-lift[bot]@users.noreply.github.com>

* feat(migrate): 添加对表迁移的操作

---------

Co-authored-by: sonatype-lift[bot] <37194012+sonatype-lift[bot]@users.noreply.github.com>
2023-04-05 00:46:30 +08:00
dependabot[bot] 179686b4cf chore(deps): bump maven-release-plugin from 2.5.3 to 3.0.0 (#78)
Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 2.5.3 to 3.0.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-2.5.3...maven-release-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 19:12:27 +08:00
carm 6f15897eb4 feat(query): 添加 containsResult(column) 以便快速验证结果。 2023-03-15 23:07:45 +08:00
dependabot[bot] 4b4215fb5d chore(deps): bump maven-surefire-plugin from 2.22.2 to 3.0.0 (#77)
Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 2.22.2 to 3.0.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-2.22.2...surefire-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 17:59:55 +08:00
dependabot[bot] d206a31986 chore(deps): bump annotations from 24.0.0 to 24.0.1 (#76)
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 24.0.0 to 24.0.1.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 19:18:59 +08:00
dependabot[bot] 948dbd3b32 chore(deps): bump maven-compiler-plugin from 3.10.1 to 3.11.0 (#75)
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 18:19:53 +08:00
dependabot[bot] 499cf3b322 chore(deps): bump log4j.version from 2.19.0 to 2.20.0 (#74)
Bumps `log4j.version` from 2.19.0 to 2.20.0.

Updates `log4j-api` from 2.19.0 to 2.20.0
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/release-2.x/CHANGELOG.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.19.0...rel/2.20.0)

Updates `log4j-core` from 2.19.0 to 2.20.0
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/release-2.x/CHANGELOG.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.19.0...rel/2.20.0)

Updates `log4j-slf4j-impl` from 2.19.0 to 2.20.0
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/release-2.x/CHANGELOG.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.19.0...rel/2.20.0)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 19:41:04 +08:00
dependabot[bot] 84c9ce77fa chore(deps): bump beecp from 3.3.9 to 3.4.0 (#73)
Bumps [beecp](https://github.com/Chris2018998/BeeCP) from 3.3.9 to 3.4.0.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.3.9...BeeCP-3.4.0)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 18:26:24 +08:00
dependabot[bot] 1f515b51b2 chore(deps): bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (#72)
Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.1...maven-javadoc-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 19:24:05 +08:00
dependabot[bot] 54ee3fd4a6 chore(deps): bump annotations from 23.1.0 to 24.0.0 (#71)
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 23.1.0 to 24.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/23.1.0...24.0.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-13 23:05:21 +08:00
dependabot[bot] 32d8fe8ef0 chore(deps): bump annotations from 23.0.0 to 23.1.0 (#70)
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 23.0.0 to 23.1.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/23.0.0...23.1.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-10 11:34:48 +08:00
dependabot[bot] c22be7c324 chore(deps): bump maven-shade-plugin from 3.4.0 to 3.4.1 (#67)
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 18:30:15 +08:00
dependabot[bot] 6bb619374f chore(deps): bump beecp from 3.3.8 to 3.3.9 (#68)
Bumps [beecp](https://github.com/Chris2018998/BeeCP) from 3.3.8 to 3.3.9.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/BeeCP-3.3.8...BeeCP-3.3.9)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 18:30:05 +08:00
dependabot[bot] a9a7543e65 chore(deps): bump log4j.version from 2.18.0 to 2.19.0 (#65)
Bumps `log4j.version` from 2.18.0 to 2.19.0.

Updates `log4j-api` from 2.18.0 to 2.19.0

Updates `log4j-core` from 2.18.0 to 2.19.0

Updates `log4j-slf4j-impl` from 2.18.0 to 2.19.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 00:05:30 +08:00
dependabot[bot] bb3aaafdd3 chore(deps): bump maven-jar-plugin from 3.2.2 to 3.3.0 (#64)
Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.2 to 3.3.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.2...maven-jar-plugin-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 22:33:52 +08:00
dependabot[bot] 0167470fc3 chore(deps): bump maven-shade-plugin from 3.3.0 to 3.4.0 (#63)
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-15 22:01:26 +08:00
carm 274b54b8d3 test(metadata): 添加Metadata读取操作的测试 2022-08-17 03:17:05 +08:00
carm fc0a3e9754 feat(metadata): 新增数个常用Metadata读取操作方法。 2022-08-17 03:16:49 +08:00
carm 5e41e21385 chore(demo): 提供方便高效的metadata读取操作方法示例。
close #59 , #60
2022-08-17 02:38:46 +08:00
carm 0230c77bb2 Merge remote-tracking branch 'origin/master' 2022-08-17 02:31:22 +08:00
carm 10ed084ad9 feat(metadata): 提供方便高效的metadata读取操作方法
mention #59 , #60
2022-08-17 02:31:09 +08:00
carm 104d4b5476 feat(metadata): 提供方便高效的metadata读取操作方法
mention #59 , #60
2022-08-17 02:31:00 +08:00
dependabot[bot] a36554391e chore(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1 (#58)
Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.0...maven-javadoc-plugin-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-15 19:50:25 +08:00
carm d92a752239 feat(future): 提供更方便的executeFuture使用方法。 2022-08-10 20:16:48 +08:00
dependabot[bot] ce088a72a7 chore(deps): bump beecp from 3.3.7 to 3.3.8 (#56)
Bumps [beecp](https://github.com/Chris2018998/BeeCP) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/Chris2018998/BeeCP/releases)
- [Commits](https://github.com/Chris2018998/BeeCP/compare/3.3.7...BeeCP-3.3.8)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 04:11:31 +08:00
carm 26ab19ec75 feat(execute): 提供Future类型的操作支持。 2022-08-05 17:55:44 +08:00
dependabot[bot] 198a800196 chore(deps): bump beecp from 3.3.6 to 3.3.7 (#53)
Bumps [beecp](https://github.com/Chris2018998/Beecp) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/Chris2018998/Beecp/releases)
- [Commits](https://github.com/Chris2018998/Beecp/compare/3.3.6...3.3.7)

---
updated-dependencies:
- dependency-name: com.github.chris2018998:beecp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-11 20:26:15 +08:00
carm 2ea8f3cfa7 Merge remote-tracking branch 'origin/master' 2022-07-10 06:50:48 +08:00
carm 2061dc13bf fix(table): 修复 SQLTable#createReplace 方法递归调用异常 2022-07-10 06:50:33 +08:00
carm 760235fae8 chore(deps): bump log4j.version from 2.17.2 to 2.18.0
Merge pull request #52 from CarmJos/dependabot/maven/log4j.version-2.18.0
2022-07-04 17:44:13 +08:00
dependabot[bot] d3036ffe4d chore(deps): bump log4j.version from 2.17.2 to 2.18.0
Bumps `log4j.version` from 2.17.2 to 2.18.0.

Updates `log4j-api` from 2.17.2 to 2.18.0

Updates `log4j-core` from 2.17.2 to 2.18.0

Updates `log4j-slf4j-impl` from 2.17.2 to 2.18.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 08:50:30 +00:00
carm 960989990b [ci skip] docs(usage): 修改用词。 2022-07-01 22:26:05 +08:00
carm b6026cb9f4 [ci skip] docs(usage): 修改用词。 2022-07-01 22:25:36 +08:00
carm 0d74b684e3 feat(table): 针对 SQLTable 进行重构与文档补充
[4.0.2] 针对 SQLTable 进行重构与文档补充
2022-07-01 22:22:38 +08:00
carm 07e47c2220 [ci skip] docs(usage): 添加文档 在小项目中推荐使用的数据库表实现方案 。 2022-07-01 22:19:26 +08:00
carm f795e6b421 [ci skip] docs(usage): 添加文档 在小项目中推荐使用的数据库表实现方案 。 2022-07-01 22:18:45 +08:00
carm c79d833d04 [ci skip] docs(usage): 添加文档 在小项目中推荐使用的数据库表实现方案 。 2022-07-01 22:18:35 +08:00
carm daa430cb14 [0.4.2] feat(table): 令 SQLTable 变为接口,额外添加 NamedSQLTable 抽象类用于简单实现 SQLTable。
BREAKING-CHANGE: SQLTable的类型已转变,以往的代码可能失效。
2022-07-01 22:14:37 +08:00
carm 248a6d6f34 fix(async): 尝试修复 #49 中提到的问题
fix(async): 尝试修复 #49 中提到的问题
2022-06-22 20:48:00 +08:00
carm 0495928e49 fix(async): 尝试修复 #49 中提到的问题 2022-06-22 20:42:08 +08:00
carm 421fe9f454 Merge pull request #48 from CarmJos/dependabot/maven/com.h2database-h2-2.1.214
Bump h2 from 2.1.212 to 2.1.214
2022-06-15 23:18:40 +08:00
dependabot[bot] f7745a2afe Bump h2 from 2.1.212 to 2.1.214
Bumps [h2](https://github.com/h2database/h2database) from 2.1.212 to 2.1.214.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.1.212...version-2.1.214)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 08:30:05 +00:00
carm 7d17324763 [0.4.0] 版本更新 2022-06-09 13:25:18 +08:00
carm 4be85f5481 feat(function): 添加 andThen 与 compose 方法
2022-06-09 13:24:23 +08:00
carm 298a5c4e81 feat(keys): 现在可以自定义返回的自增主键类型。
现在可以通过 returnGeneratedKey(Class<T> numberClass) 方法要求返回指定类型的自增主键。

BREAKING CHANGE: 移除了对于“是否返回主键”的选择,一旦定义了主键类型,就代表action将返回该类型的主键。
2022-06-09 12:12:11 +08:00
carm 9b4460f97a fix(debug): 修复debug消息中耗时计算异常的问题 2022-06-06 18:18:26 +08:00
carm f16b5f22e1 ci(deploy): 添加repo分支的相关介绍。 2022-06-03 03:24:01 +08:00
carm 1a4b5c245a ci(deploy): 修改部署配置 2022-06-03 03:17:37 +08:00
69 changed files with 1763 additions and 446 deletions
+10 -1
View File
@@ -5,10 +5,19 @@
## 目录
- [Bob的EasySQL之旅(HikariCP)](USAGE-HIKARI.md) `@Ghost-Chu`
### 文章
- [Bob的EasySQL之旅(HikariCP)](USAGE-HIKARI.md) `by @Ghost-Chu`
- [在**小项目中**推荐使用的**数据库表**实现方案](USAGE-TABLE.md) `by @CarmJos`
### 视频
- [EasySql快速操作Mysql数据库:我的世界插件开发](https://www.bilibili.com/video/BV1w34y1p7Xs) `by @Shinyoki`
## 实例项目
以下是一些实例项目,可供各位参考。
- UltraDepository 超级仓库插件 `@CarmJos`
- [storage/MySQLStorage](https://github.com/CarmJos/UltraDepository/blob/master/src/main/java/cc/carm/plugin/ultradepository/storage/impl/MySQLStorage.java)
- QuickShop-Hikari 快速商店插件 `@Ghost-Chu`
- [database/](https://github.com/Ghost-chu/QuickShop-Hikari/tree/hikari/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/database)
+2 -2
View File
@@ -1,6 +1,6 @@
> 本文档由 GitHub 用户 @Ghost-chu 创建。
> 本文撰写于 2022/02/09,适配 EasySQL 版本 `v0.3.6`。
> 本文基于 `EasySQL-HikariPool` 版本编写。
> 本文撰写于 2022/02/09,适配 EasySQL 版本 `v0.3.6` **(部分接口已变更)**
> 本文基于 `EasySQL-Hikari` 版本编写。
# EasySQL - HikariPool 使用指南
+161
View File
@@ -0,0 +1,161 @@
> 本文档由 GitHub 用户 @CarmJos 创建。
> 本文撰写于 2022/07/01,基于 EasySQL 版本 `0.4.2` 。
# 在**小项目中**推荐使用的**数据库表**实现方案
## 简介
在小型项目中,我们常常需要编写数据库的表结构,并需要在开发中不断地参考、维护该结构。
在 EasySQL 中,我们提供了一个简单快捷的数据库表创建工具 `TableCreateBuilder`
基于该工具,又在后续版本中提供了 `SQLTable` 类用于快速针对指定表创建不同的数据库操作。
_SQLTable同时提供了有SQLManager参数与无参的操作方法,其中无参方法将自动调用初始化时使用的SQLManager进行操作。_
以下内容是我在许多项目中的使用方法,由于其 `便捷``易于管理``支持引用查询` ,我十分推荐您参考我的方案,并应用到自己的项目中。
### 实例项目:
- [QuickShop-Hikari (DataTables)](https://github.com/Ghost-chu/QuickShop-Hikari/blob/hikari/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/database/DataTables.java)
## 利用 NamedSQLTable 快速创建枚举类以管理
这种方案的优势在于无需复制大量代码,仅需使用EasySQL已经提供的 `NamedSQLTable` 类快捷进行数据库操作。
首先,我们需要创建一个枚举类,[示例代码](../demo/src/main/java/DataTables1.java)如下所示:
```java
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.NumberType;
import cc.carm.lib.easysql.api.table.NamedSQLTable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
public enum DataTables {
DATA(SQLTable.of("data", (table) -> {
table.addAutoIncrementColumn("id", true);
table.addColumn("user", "INT UNSIGNED NOT NULL");
table.addColumn("content", "TEXT NOT NULL");
table.addColumn("time", "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP");
})),
USER(SQLTable.of("user", (table) -> {
table.addAutoIncrementColumn("id", NumberType.INT, true, true);
table.addColumn("uuid", "VARCHAR(32) NOT NULL UNIQUE KEY");
table.addColumn("username", "VARCHAR(16) NOT NULL");
table.addColumn("age", "TINYINT NOT NULL DEFAULT 1");
table.addColumn("email", "VARCHAR(32)");
table.addColumn("phone", "VARCHAR(16)");
table.addColumn("registerTime", "DATETIME NOT NULL");
table.setIndex("username", IndexType.UNIQUE_KEY); // 添加唯一索引
table.setIndex(IndexType.INDEX, "contact", "email", "phone"); //添加联合索引 (示例)
}));
private final NamedSQLTable table;
DataTables(NamedSQLTable table) {
this.table = table;
}
public NamedSQLTable get() {
return this.table;
}
public static void initialize(@NotNull SQLManager manager, @Nullable String tablePrefix) {
for (DataTables value : values()) {
try {
value.get().create(manager, tablePrefix);
} catch (SQLException e) {
// 提示异常
}
}
}
}
```
随后,我们便可以在数据库初始化时调用 `DataTables#initialize(manager,tablePrefix)` 方法快捷的进行表的初始化。
初始化后,我们便可以通过 `DataTables#get()` 方法获取对应表的 `NamedSQLTable` 实例,以进行 `createQuery()` 等操作。
## 利用枚举类实现 SQLTable 进行操作
这种方法相较于前者代码量稍多些,但无需在每次调用先通过 `DataTables#get()` 方法获取 NamedSQLTable 实例,代码上更为简洁。
且可以通过重写 `getTableName()` 方法来自行规定表前缀。
_该方法为本人最常用,也是最推荐的方法。_
[示例代码](../demo/src/main/java/DataTables2.java)如下:
```java
import cc.carm.lib.easysql.api.builder.TableCreateBuilder;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.NumberType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.function.Consumer;
public enum DataTables implements SQLTable {
USER((table) -> {
table.addAutoIncrementColumn("id", NumberType.INT, true, true);
table.addColumn("uuid", "VARCHAR(32) NOT NULL UNIQUE KEY");
table.addColumn("username", "VARCHAR(16) NOT NULL");
table.addColumn("age", "TINYINT NOT NULL DEFAULT 1");
table.addColumn("email", "VARCHAR(32)");
table.addColumn("phone", "VARCHAR(16)");
table.addColumn("registerTime", "DATETIME NOT NULL");
table.setIndex("username", IndexType.UNIQUE_KEY); // 添加唯一索引
table.setIndex(IndexType.INDEX, "contact", "email", "phone"); //添加联合索引 (示例)
});
private final Consumer<TableCreateBuilder> builder;
private @Nullable String tablePrefix;
private @Nullable SQLManager manager;
DataTables(Consumer<TableCreateBuilder> builder) {
this.builder = builder;
}
@Override
public @Nullable SQLManager getSQLManager() {
return this.manager;
}
@Override
public @NotNull String getTableName() {
// 这里直接选择用枚举的名称作为table的主名称
return (tablePrefix != null ? tablePrefix : "") + name().toLowerCase();
}
@Override
public boolean create(SQLManager sqlManager) throws SQLException {
return create(sqlManager, null);
}
public boolean create(@NotNull SQLManager sqlManager, @Nullable String tablePrefix) throws SQLException {
if (this.manager == null) this.manager = sqlManager;
this.tablePrefix = tablePrefix;
TableCreateBuilder tableBuilder = sqlManager.createTable(getTableName());
if (builder != null) builder.accept(tableBuilder);
return tableBuilder.build().executeFunction(l -> l > 0, false);
}
public static void initialize(@NotNull SQLManager manager, @Nullable String tablePrefix) {
for (DataTables value : values()) {
try {
value.create(manager, tablePrefix);
} catch (SQLException e) {
// 提示异常
}
}
}
}
```
+27
View File
@@ -0,0 +1,27 @@
# EasySQL Repository
采用github的repo分支进行依赖,随项目发布而自动更新。
其他依赖方式见主页介绍。
## 依赖方式
### Maven
```xml
<repositories>
<repository>
<id>EasySQL</id>
<name>GitHub Branch Repository</name>
<url>https://github.com/CarmJos/EasySQL/blob/repo/</url>
</repository>
</repositories>
```
### Gradle
```groovy
repositories {
maven { url 'https://github.com/CarmJos/EasySQL/blob/repo/' }
}
```
+3 -3
View File
@@ -29,11 +29,11 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
uses: codacy/codacy-analysis-cli-action@30783d03e758713bb5ed7b79292cfb14b9dd9a4a
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
@@ -49,6 +49,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
+4 -4
View File
@@ -38,11 +38,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v4
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v4
+66 -85
View File
@@ -11,13 +11,13 @@ on:
types: [ published ]
jobs:
gh-deploy:
packages-deploy:
name: "Publish Project (GitHub Packages)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: "Set up JDK"
uses: actions/setup-java@v2
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
@@ -28,19 +28,69 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Maven Deploy With Javadoc"
- name: "Packages Deploy"
run: mvn -B -Pgithub deploy --file pom.xml -DskipTests
env:
MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: "Copy Javadoc to Location"
central-deploy:
name: "Deploy Project (Central Repository)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Set up JDK"
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Central Deploy"
run: mvn -B -Possrh deploy --file pom.xml -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
github-deploy:
name: "Deploy Project (GitHub Repository)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Set up JDK"
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Maven Deploy"
run: mvn -B -Plocal deploy --file pom.xml -DskipTests
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: "Copy artifacts"
run: |
rm -rf deploy
mkdir -vp deploy
cp -vrf $HOME/local-deploy/* deploy/
cp -vrf .documentation/repository/README.md deploy/README.md
- name: "Copy Javadoc"
run: |
rm -rf docs
mkdir -vp docs
cp -vrf api/target/apidocs/* docs/
cp -vrf .documentation/JAVADOC-README.md docs/README.md
cp -vrf .documentation/javadoc/README.md docs/README.md
- name: "Generate the Javadoc sitemap"
id: sitemap
@@ -67,82 +117,7 @@ jobs:
git config --global user.name '${{ github.repository_owner }}'
git config --global user.email '${{ github.repository_owner }}@users.noreply.github.com'
- name: "Commit documentations"
run: |
cd docs
git init
git remote add origin git@github.com:${{ github.repository_owner }}/${{ github.event.repository.name }}.git
git checkout -b gh-pages
git add -A
git commit -m "API Document generated."
- name: "Push javadocs"
run: |
cd docs
git push origin HEAD:gh-pages --force
central-deploy:
name: "Deploy Project (Central Repository)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Set up JDK"
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Central Deploy"
run: mvn -B -Possrh deploy --file pom.xml -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
local-deploy:
name: "Deploy Project (GitHub Repository)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Set up JDK"
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Maven Deploy"
run: mvn -B -Plocal deploy --file pom.xml -DskipTests
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: "Copy artifacts"
run: |
rm -rf deploy
mkdir -vp deploy
cp -vrf $HOME/local-deploy/* deploy/
- name: "Configure Git"
env:
DEPLOY_PRI: ${{secrets.DEPLOY_PRI}}
run: |
sudo timedatectl set-timezone "Asia/Shanghai"
mkdir -p ~/.ssh/
echo "$DEPLOY_PRI" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.name '${{ github.repository_owner }}'
git config --global user.email '${{ github.repository_owner }}@users.noreply.github.com'
- name: "Commit files"
- name: "Commit&Push repository files"
run: |
cd deploy
git init
@@ -150,8 +125,14 @@ jobs:
git checkout -b repo
git add -A
git commit -m "Maven project deployment."
git push origin HEAD:repo --force
- name: "Push files"
- name: "Commit&Push documentations"
run: |
cd deploy
git push origin HEAD:repo --force
cd docs
git init
git remote add origin git@github.com:${{ github.repository_owner }}/${{ github.event.repository.name }}.git
git checkout -b gh-pages
git add -A
git commit -m "API documentation deployment."
git push origin HEAD:gh-pages --force
+3 -3
View File
@@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: "Set up JDK"
uses: actions/setup-java@v2
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
@@ -26,7 +26,7 @@ jobs:
- name: "Target Stage"
run: mkdir staging && cp */target/*.jar staging
- name: "Upload artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: Artifact
path: staging
+2 -1
View File
@@ -1,3 +1,4 @@
/.idea/
**/target/
**.iml
**.iml
demo/logs
+2 -2
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<version>0.3.17</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -56,7 +56,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>2.0.17</version>
</dependency>
</dependencies>
@@ -12,6 +12,9 @@ import java.sql.SQLException;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
/**
* SQLAction 是用于承载SQL语句并进行处理、返回的基本类。
@@ -49,11 +52,23 @@ public interface SQLAction<T> {
@NotNull String getShortID();
/**
* 得到该Action的创建时间
* 得到该Action的创建时间
* <br>注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
*
* @return 创建时间 (毫秒)
*/
default long getCreateTime() {
return getCreateTime(TimeUnit.MILLISECONDS);
}
/**
* 得到该Action的创建时间
* <br>注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
*
* @param unit 时间单位
* @return 创建时间
*/
long getCreateTime();
long getCreateTime(TimeUnit unit);
/**
* 得到该Action所要执行的源SQL语句
@@ -193,6 +208,22 @@ public interface SQLAction<T> {
void executeAsync(@Nullable SQLHandler<T> success,
@Nullable SQLExceptionHandler failure);
/**
* 以异步Future方式执行SQL语句。
*
* @return 异步执行的Future实例,可通过 {@link Future#get()} 阻塞并等待结果。
*/
default @NotNull CompletableFuture<Void> executeFuture() {
return executeFuture((t -> null));
}
/**
* 以异步Future方式执行SQL语句。
*
* @return 异步执行的Future实例,可通过 {@link Future#get()} 阻塞并等待结果。
*/
<R> @NotNull CompletableFuture<R> executeFuture(@NotNull SQLFunction<T, R> handler);
default void handleException(@Nullable SQLExceptionHandler handler, SQLException exception) {
if (handler == null) handler = defaultExceptionHandler();
handler.accept(exception, this);
@@ -5,18 +5,26 @@ import cc.carm.lib.easysql.api.action.PreparedSQLUpdateBatchAction;
import cc.carm.lib.easysql.api.action.SQLUpdateAction;
import cc.carm.lib.easysql.api.action.SQLUpdateBatchAction;
import cc.carm.lib.easysql.api.builder.*;
import cc.carm.lib.easysql.api.function.SQLBiFunction;
import cc.carm.lib.easysql.api.function.SQLDebugHandler;
import cc.carm.lib.easysql.api.function.SQLExceptionHandler;
import cc.carm.lib.easysql.api.function.SQLFunction;
import cc.carm.lib.easysql.api.migrate.SQLMigrate;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Supplier;
/**
@@ -30,6 +38,32 @@ public interface SQLManager {
boolean isDebugMode();
/**
* 获取用于执行 {@link SQLAction#executeAsync()} 的线程池。
* <br> 默认线程池为 {@link #defaultExecutorPool(String)} 。
*
* @return {@link ExecutorService}
*/
@NotNull ExecutorService getExecutorPool();
/**
* 设定用于执行 {@link SQLAction#executeAsync()} 的线程池.
* <br> 默认线程池为 {@link #defaultExecutorPool(String)} 。
*
* @param executorPool {@link ExecutorService}
*/
void setExecutorPool(@NotNull ExecutorService executorPool);
static ExecutorService defaultExecutorPool(String threadName) {
return Executors.newFixedThreadPool(4, r -> {
Thread thread = new Thread(r, threadName);
thread.setDaemon(true);
return thread;
});
}
/**
* 设定是否启用调试模式。
* 启用调试模式后,会在每次执行SQL语句时,调用 {@link #getDebugHandler()} 来输出调试信息。
@@ -110,7 +144,7 @@ public interface SQLManager {
* @return 更新的行数
* @see SQLUpdateAction
*/
@Nullable Long executeSQL(String sql);
@Nullable Integer executeSQL(String sql);
/**
* 执行一条不需要返回结果的预处理SQL更改(UPDATE、REPLACE、DELETE)
@@ -120,7 +154,7 @@ public interface SQLManager {
* @return 更新的行数
* @see PreparedSQLUpdateAction
*/
@Nullable Long executeSQL(String sql, Object[] params);
@Nullable Integer executeSQL(String sql, Object[] params);
/**
* 执行多条不需要返回结果的SQL更改(UPDATE、REPLACE、DELETE)
@@ -130,7 +164,7 @@ public interface SQLManager {
* @return 对应参数返回的行数
* @see PreparedSQLUpdateBatchAction
*/
@Nullable List<Long> executeSQLBatch(String sql, Iterable<Object[]> paramsBatch);
@Nullable List<Integer> executeSQLBatch(String sql, Iterable<Object[]> paramsBatch);
/**
@@ -153,7 +187,55 @@ public interface SQLManager {
@Nullable List<Integer> executeSQLBatch(@NotNull Iterable<String> sqlBatch);
/**
* 在库中创建一个表
* 获取并操作 {@link DatabaseMetaData} 以得到需要的数据库消息。
*
* @param reader 操作与读取的方法
* @param <R> 最终结果的返回类型
* @return 最终结果,通过 {@link CompletableFuture#get()} 可阻塞并等待结果返回。
*/
default <R> CompletableFuture<R> fetchMetadata(@NotNull SQLFunction<DatabaseMetaData, R> reader) {
return fetchMetadata((meta, conn) -> reader.apply(meta));
}
/**
* 获取并操作 {@link DatabaseMetaData} 提供的指定 {@link ResultSet} 以得到需要的数据库消息。
* <br> 该方法会自动关闭 {@link ResultSet} 。
*
* @param supplier 操作 {@link DatabaseMetaData} 以提供信息所在的 {@link ResultSet}
* @param reader 读取 {@link ResultSet} 中指定信息的方法
* @param <R> 最终结果的返回类型
* @return 最终结果,通过 {@link CompletableFuture#get()} 可阻塞并等待结果返回。
* @throws NullPointerException 当 supplier 提供的 {@link ResultSet} 为NULL时抛出
*/
default <R> CompletableFuture<R> fetchMetadata(@NotNull SQLFunction<DatabaseMetaData, ResultSet> supplier,
@NotNull SQLFunction<@NotNull ResultSet, R> reader) {
return fetchMetadata((meta, conn) -> supplier.apply(meta), reader);
}
/**
* 获取并操作 {@link DatabaseMetaData} 以得到需要的数据库消息。
*
* @param reader 操作与读取的方法
* @param <R> 最终结果的返回类型
* @return 最终结果,通过 {@link CompletableFuture#get()} 可阻塞并等待结果返回。
*/
<R> CompletableFuture<R> fetchMetadata(@NotNull SQLBiFunction<DatabaseMetaData, Connection, R> reader);
/**
* 获取并操作 {@link DatabaseMetaData} 提供的指定 {@link ResultSet} 以得到需要的数据库消息。
* <br> 该方法会自动关闭 {@link ResultSet} 。
*
* @param supplier 操作 {@link DatabaseMetaData} 以提供信息所在的 {@link ResultSet}
* @param reader 读取 {@link ResultSet} 中指定信息的方法
* @param <R> 最终结果的返回类型
* @return 最终结果,通过 {@link CompletableFuture#get()} 可阻塞并等待结果返回。
* @throws NullPointerException 当 supplier 提供的 {@link ResultSet} 为NULL时抛出
*/
<R> CompletableFuture<R> fetchMetadata(@NotNull SQLBiFunction<DatabaseMetaData, Connection, ResultSet> supplier,
@NotNull SQLFunction<@NotNull ResultSet, R> reader);
/**
* 在库中创建一个表。
*
* @param tableName 表名
* @return {@link TableCreateBuilder}
@@ -161,7 +243,7 @@ public interface SQLManager {
TableCreateBuilder createTable(@NotNull String tableName);
/**
* 对库中的某个表执行更改
* 对库中的某个表执行更改
*
* @param tableName 表名
* @return {@link TableAlterBuilder}
@@ -169,46 +251,62 @@ public interface SQLManager {
TableAlterBuilder alterTable(@NotNull String tableName);
/**
* 新建一个查询
* 快速获取表的部分元数据。
* <br> 当需要获取其他元数据时,请使用 {@link #fetchMetadata(SQLFunction, SQLFunction)} 方法。
*
* @param tablePattern 表名通配符
* @return {@link TableMetadataBuilder}
*/
TableMetadataBuilder fetchTableMetadata(@NotNull String tablePattern);
/**
* 新建一个查询。
*
* @return {@link QueryBuilder}
*/
QueryBuilder createQuery();
/**
* 建一条插入操作
* 建一个迁移操作
*
* @return {@link SQLMigrate}
*/
SQLMigrate createMigrate();
/**
* 创建一条插入操作。
*
* @param tableName 目标表名
* @return {@link InsertBuilder}
*/
InsertBuilder<PreparedSQLUpdateAction> createInsert(@NotNull String tableName);
InsertBuilder<PreparedSQLUpdateAction<Integer>> createInsert(@NotNull String tableName);
/**
* 创建支持多组数据的插入操作
* 创建支持多组数据的插入操作
*
* @param tableName 目标表名
* @return {@link InsertBuilder}
*/
InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch(@NotNull String tableName);
InsertBuilder<PreparedSQLUpdateBatchAction<Integer>> createInsertBatch(@NotNull String tableName);
/**
* 创建一条替换操作
* 创建一条替换操作
*
* @param tableName 目标表名
* @return {@link ReplaceBuilder}
*/
ReplaceBuilder<PreparedSQLUpdateAction> createReplace(@NotNull String tableName);
ReplaceBuilder<PreparedSQLUpdateAction<Integer>> createReplace(@NotNull String tableName);
/**
* 创建支持多组数据的替换操作
* 创建支持多组数据的替换操作
*
* @param tableName 目标表名
* @return {@link ReplaceBuilder}
*/
ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch(@NotNull String tableName);
ReplaceBuilder<PreparedSQLUpdateBatchAction<Integer>> createReplaceBatch(@NotNull String tableName);
/**
* 创建更新操作
* 创建更新操作
*
* @param tableName 目标表名
* @return {@link UpdateBuilder}
@@ -216,7 +314,7 @@ public interface SQLManager {
UpdateBuilder createUpdate(@NotNull String tableName);
/**
* 创建删除操作
* 创建删除操作
*
* @param tableName 目标表名
* @return {@link DeleteBuilder}
@@ -5,7 +5,9 @@ import cc.carm.lib.easysql.api.action.query.QueryAction;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.concurrent.TimeUnit;
/**
* SQLQuery 是一个查询中间接口,用于查询操作的封装。
@@ -16,10 +18,22 @@ public interface SQLQuery extends AutoCloseable {
/**
* 获取该查询创建的时间
* <br>注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
*
* @return 创建时间
*/
long getExecuteTime();
default long getExecuteTime() {
return getExecuteTime(TimeUnit.MILLISECONDS);
}
/**
* 获取该查询创建的时间
* <br>注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
*
* @param timeUnit 时间单位
* @return 创建时间
*/
long getExecuteTime(TimeUnit timeUnit);
/**
* 得到承载该SQLQuery的对应{@link SQLManager}
@@ -37,6 +51,10 @@ public interface SQLQuery extends AutoCloseable {
ResultSet getResultSet();
default boolean containsResult(String columnName) throws SQLException {
return getResultSet() != null && getResultSet().getObject(columnName) != null;
}
/**
* 得到设定的SQL语句
*
@@ -4,29 +4,33 @@ import cc.carm.lib.easysql.api.action.PreparedSQLUpdateAction;
import cc.carm.lib.easysql.api.action.PreparedSQLUpdateBatchAction;
import cc.carm.lib.easysql.api.builder.*;
import cc.carm.lib.easysql.api.function.SQLHandler;
import cc.carm.lib.easysql.api.table.NamedSQLTable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.Optional;
/**
* SQLTable 基于 {@link TableCreateBuilder} 构建表,用于快速创建与该表相关的操作。
* <ul>
* <li>1. 调用 {@link SQLTable#of(String, String[])} 方法创建一个 SQLTable 对象;</li>
* <li>2. 在应用初始化阶段调用 {@link SQLTable#create(SQLManager)} 方法初始化 SQLTable 对象;</li>
* <li>3. 获取已创建的{@link SQLTable} 实例,直接调用对应方法进行关于表的相关操作。</li>
* <li>1. 调用 {@link NamedSQLTable#of(String, String[])} 方法创建一个 SQLTable 对象;</li>
* <li>2. 在应用初始化阶段调用 {@link NamedSQLTable#create(SQLManager)} 方法初始化 SQLTable 对象;</li>
* <li>3. 获取已创建的{@link NamedSQLTable} 实例,直接调用对应方法进行关于表的相关操作。</li>
* </ul>
*
* @author CarmJos
* @since 0.3.10
*/
public abstract class SQLTable {
public interface SQLTable {
public static @NotNull SQLTable of(@NotNull String tableName, @Nullable SQLHandler<TableCreateBuilder> table) {
return new SQLTable(tableName) {
static @NotNull NamedSQLTable of(@NotNull String tableName, @Nullable SQLHandler<TableCreateBuilder> table) {
return new NamedSQLTable(tableName) {
@Override
public boolean create(SQLManager sqlManager) throws SQLException {
public boolean create(@NotNull SQLManager sqlManager, String tablePrefix) throws SQLException {
if (this.manager == null) this.manager = sqlManager;
this.tablePrefix = tablePrefix;
TableCreateBuilder tableBuilder = sqlManager.createTable(getTableName());
if (table != null) table.accept(tableBuilder);
return tableBuilder.build().executeFunction(l -> l > 0, false);
@@ -34,102 +38,112 @@ public abstract class SQLTable {
};
}
public static @NotNull SQLTable of(@NotNull String tableName, @NotNull String[] columns) {
static @NotNull NamedSQLTable of(@NotNull String tableName, @NotNull String[] columns) {
return of(tableName, columns, null);
}
public static @NotNull SQLTable of(@NotNull String tableName,
@NotNull String[] columns, @Nullable String tableSettings) {
static @NotNull NamedSQLTable of(@NotNull String tableName,
@NotNull String[] columns, @Nullable String tableSettings) {
return of(tableName, builder -> {
builder.setColumns(columns);
if (tableSettings != null) builder.setTableSettings(tableSettings);
});
}
private final @NotNull String tableName;
protected SQLManager manager;
/**
* 以指定的 {@link SQLManager} 实例初始化并创建该表
*
* @param sqlManager {@link SQLManager} 实例
* @return 是否新创建了本表 (若已创建或创建失败则返回false)
* @throws SQLException 当数据库返回异常时抛出
*/
boolean create(SQLManager sqlManager) throws SQLException;
/**
* 请调用 {@link SQLTable} 下的静态方法进行对象的初始化。
* 得到 {@link #create(SQLManager)} 用于初始化本实例的 {@link SQLManager} 实例
*
* @param tableName 该表的名称
* @return {@link SQLManager} 实例
*/
private SQLTable(@NotNull String tableName) {
this.tableName = tableName;
}
public @NotNull String getTableName() {
return tableName;
}
@Nullable SQLManager getSQLManager();
/**
* 使用指定 SQLManager 进行本示例的初始化
* 得到本表表名,不得为空
*
* @param sqlManager {@link SQLManager}
* @return 本表是否为首次创建
* @throws SQLException 出现任何错误时抛出
* @return 本表表名
*/
public abstract boolean create(SQLManager sqlManager) throws SQLException;
@NotNull String getTableName();
public @NotNull TableQueryBuilder createQuery(@NotNull SQLManager sqlManager) {
default @NotNull TableQueryBuilder createQuery() {
return Optional.ofNullable(getSQLManager()).map(this::createQuery)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
default @NotNull TableQueryBuilder createQuery(@NotNull SQLManager sqlManager) {
return sqlManager.createQuery().inTable(getTableName());
}
public @NotNull TableQueryBuilder createQuery() {
return createQuery(this.manager);
default @NotNull DeleteBuilder createDelete() {
return Optional.ofNullable(getSQLManager()).map(this::createDelete)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
public @NotNull DeleteBuilder createDelete() {
return createDelete(this.manager);
}
public @NotNull DeleteBuilder createDelete(@NotNull SQLManager sqlManager) {
default @NotNull DeleteBuilder createDelete(@NotNull SQLManager sqlManager) {
return sqlManager.createDelete(getTableName());
}
public @NotNull UpdateBuilder createUpdate() {
return createUpdate(this.manager);
default @NotNull UpdateBuilder createUpdate() {
return Optional.ofNullable(getSQLManager()).map(this::createUpdate)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
public @NotNull UpdateBuilder createUpdate(@NotNull SQLManager sqlManager) {
default @NotNull UpdateBuilder createUpdate(@NotNull SQLManager sqlManager) {
return sqlManager.createUpdate(getTableName());
}
public @NotNull InsertBuilder<PreparedSQLUpdateAction> createInsert() {
return createInsert(this.manager);
default @NotNull InsertBuilder<PreparedSQLUpdateAction<Integer>> createInsert() {
return Optional.ofNullable(getSQLManager()).map(this::createInsert)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
public @NotNull InsertBuilder<PreparedSQLUpdateAction> createInsert(@NotNull SQLManager sqlManager) {
default @NotNull InsertBuilder<PreparedSQLUpdateAction<Integer>> createInsert(@NotNull SQLManager sqlManager) {
return sqlManager.createInsert(getTableName());
}
public @NotNull InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch() {
return createInsertBatch(this.manager);
default @NotNull InsertBuilder<PreparedSQLUpdateBatchAction<Integer>> createInsertBatch() {
return Optional.ofNullable(getSQLManager()).map(this::createInsertBatch)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
public @NotNull InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch(@NotNull SQLManager sqlManager) {
default @NotNull InsertBuilder<PreparedSQLUpdateBatchAction<Integer>> createInsertBatch(@NotNull SQLManager sqlManager) {
return sqlManager.createInsertBatch(getTableName());
}
default @NotNull ReplaceBuilder<PreparedSQLUpdateAction<Integer>> createReplace() {
return Optional.ofNullable(getSQLManager()).map(this::createReplace)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
public @NotNull ReplaceBuilder<PreparedSQLUpdateAction> createReplace() {
return createReplace(this.manager);
}
public @NotNull ReplaceBuilder<PreparedSQLUpdateAction> createReplace(@NotNull SQLManager sqlManager) {
default @NotNull ReplaceBuilder<PreparedSQLUpdateAction<Integer>> createReplace(@NotNull SQLManager sqlManager) {
return sqlManager.createReplace(getTableName());
}
public @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch() {
return createReplaceBatch(this.manager);
default @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction<Integer>> createReplaceBatch() {
return Optional.ofNullable(getSQLManager()).map(this::createReplaceBatch)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
public @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch(@NotNull SQLManager sqlManager) {
default @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction<Integer>> createReplaceBatch(@NotNull SQLManager sqlManager) {
return sqlManager.createReplaceBatch(getTableName());
}
default @NotNull TableAlterBuilder alter() {
return Optional.ofNullable(getSQLManager()).map(this::alter)
.orElseThrow(() -> new NullPointerException("This table doesn't have a SQLManger."));
}
default @NotNull TableAlterBuilder alter(@NotNull SQLManager sqlManager) {
return sqlManager.alterTable(getTableName());
}
}
@@ -2,7 +2,7 @@ package cc.carm.lib.easysql.api.action;
import org.jetbrains.annotations.Nullable;
public interface PreparedSQLUpdateAction extends SQLUpdateAction {
public interface PreparedSQLUpdateAction<T extends Number> extends SQLUpdateAction<T> {
/**
* 设定SQL语句中所有 ? 对应的参数
@@ -10,14 +10,15 @@ public interface PreparedSQLUpdateAction extends SQLUpdateAction {
* @param params 参数内容
* @return {@link PreparedSQLUpdateAction}
*/
PreparedSQLUpdateAction setParams(Object... params);
PreparedSQLUpdateAction<T> setParams(Object... params);
/**
* 设定SQL语句中所有 ? 对应的参数
*
* @param params 参数内容
* @return {@link PreparedSQLUpdateAction}
* @since 0.4.0
*/
PreparedSQLUpdateAction setParams(@Nullable Iterable<Object> params);
PreparedSQLUpdateAction<T> setParams(@Nullable Iterable<Object> params);
}
@@ -4,7 +4,7 @@ import cc.carm.lib.easysql.api.SQLAction;
import java.util.List;
public interface PreparedSQLUpdateBatchAction extends SQLAction<List<Long>> {
public interface PreparedSQLUpdateBatchAction<T extends Number> extends SQLAction<List<T>> {
/**
* 设定多组SQL语句中所有 ? 对应的参数
@@ -12,7 +12,7 @@ public interface PreparedSQLUpdateBatchAction extends SQLAction<List<Long>> {
* @param allParams 所有参数内容
* @return {@link PreparedSQLUpdateBatchAction}
*/
PreparedSQLUpdateBatchAction setAllParams(Iterable<Object[]> allParams);
PreparedSQLUpdateBatchAction<T> setAllParams(Iterable<Object[]> allParams);
/**
* 添加一组SQL语句中所有 ? 对应的参数
@@ -20,37 +20,23 @@ public interface PreparedSQLUpdateBatchAction extends SQLAction<List<Long>> {
* @param params 参数内容
* @return {@link PreparedSQLUpdateBatchAction}
*/
PreparedSQLUpdateBatchAction addParamsBatch(Object... params);
/**
* 设定自增主键的序列
*
* @param keyColumnIndex 自增主键的序列
* <br>若该值 0,则 {@link #execute()} 返回自增主键数值
* <br>若该值 ≤ 0,则 {@link #execute()} 返回变更的行数
* @return {@link PreparedSQLUpdateBatchAction}
* @see #setReturnGeneratedKeys(boolean)
*/
@Deprecated
default PreparedSQLUpdateBatchAction setKeyIndex(int keyColumnIndex) {
return setReturnGeneratedKeys(keyColumnIndex > 0);
}
PreparedSQLUpdateBatchAction<T> addParamsBatch(Object... params);
/**
* 设定该操作返回自增键序列。
*
* @return {@link PreparedSQLUpdateBatchAction}
* @return {@link SQLUpdateAction}
*/
default PreparedSQLUpdateBatchAction returnGeneratedKeys() {
return setReturnGeneratedKeys(true);
}
PreparedSQLUpdateBatchAction<T> returnGeneratedKeys();
/**
* 设定该操作是否返回自增键序列。
* 设定该操作返回自增键序列。
*
* @param returnGeneratedKey 是否返回自增序列
* @return {@link PreparedSQLUpdateBatchAction}
* @param keyTypeClass 自增序列的数字类型
* @param <N> 自增键序列类型 {@link Number}
* @return {@link SQLUpdateAction}
* @since 0.4.0
*/
PreparedSQLUpdateBatchAction setReturnGeneratedKeys(boolean returnGeneratedKey);
<N extends Number> PreparedSQLUpdateBatchAction<N> returnGeneratedKeys(Class<N> keyTypeClass);
}
@@ -2,37 +2,25 @@ package cc.carm.lib.easysql.api.action;
import cc.carm.lib.easysql.api.SQLAction;
public interface SQLUpdateAction extends SQLAction<Long> {
public interface SQLUpdateAction<T extends Number> extends SQLAction<T> {
/**
* 设定自增主键的序列
*
* @param keyColumnIndex 自增主键的序列
* <br>若该值 0,则 {@link #execute()} 返回自增主键数值
* <br>若该值 ≤ 0,则 {@link #execute()} 返回变更的行数
* @return {@link SQLUpdateAction}
* @see #setReturnGeneratedKey(boolean)
*/
@Deprecated
default SQLUpdateAction setKeyIndex(int keyColumnIndex) {
return setReturnGeneratedKey(keyColumnIndex > 0);
}
/**
* 设定该操作返回自增键序列。
*
* @return {@link SQLUpdateAction}
*/
default SQLUpdateAction returnGeneratedKey() {
return setReturnGeneratedKey(true);
}
SQLUpdateAction<T> returnGeneratedKey();
/**
* 设定该操作是否返回自增键序列。
* 设定该操作返回自增键序列。
*
* @param returnGeneratedKey 是否返回自增序列
* @param keyTypeClass 自增序列的数字类型
* @param <N> 自增键序列类型 {@link Number}
* @return {@link SQLUpdateAction}
* @since 0.4.0
*/
SQLUpdateAction setReturnGeneratedKey(boolean returnGeneratedKey);
<N extends Number> SQLUpdateAction<N> returnGeneratedKey(Class<N> keyTypeClass);
}
@@ -2,7 +2,7 @@ package cc.carm.lib.easysql.api.builder;
import cc.carm.lib.easysql.api.SQLAction;
public interface DeleteBuilder extends ConditionalBuilder<DeleteBuilder, SQLAction<Long>> {
public interface DeleteBuilder extends ConditionalBuilder<DeleteBuilder, SQLAction<Integer>> {
String getTableName();
@@ -10,13 +10,13 @@ import org.jetbrains.annotations.Nullable;
public interface TableAlterBuilder extends SQLBuilder {
SQLAction<Long> renameTo(@NotNull String newTableName);
SQLAction<Integer> renameTo(@NotNull String newTableName);
SQLAction<Long> changeComment(@NotNull String newTableComment);
SQLAction<Integer> changeComment(@NotNull String newTableComment);
SQLAction<Long> setAutoIncrementIndex(int index);
SQLAction<Integer> setAutoIncrementIndex(int index);
SQLAction<Long> addIndex(@NotNull IndexType indexType, @Nullable String indexName,
SQLAction<Integer> addIndex(@NotNull IndexType indexType, @Nullable String indexName,
@NotNull String columnName, @NotNull String... moreColumns);
/**
@@ -25,7 +25,7 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param indexName 索引名
* @return {@link SQLUpdateAction}
*/
SQLAction<Long> dropIndex(@NotNull String indexName);
SQLAction<Integer> dropIndex(@NotNull String indexName);
/**
* 为该表移除一个外键
@@ -33,14 +33,14 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param keySymbol 外键名
* @return {@link SQLUpdateAction}
*/
SQLAction<Long> dropForeignKey(@NotNull String keySymbol);
SQLAction<Integer> dropForeignKey(@NotNull String keySymbol);
/**
* 为该表移除主键(须添加新主键)
*
* @return {@link SQLUpdateAction}
*/
SQLAction<Long> dropPrimaryKey();
SQLAction<Integer> dropPrimaryKey();
/**
* 为表添加一列
@@ -49,7 +49,7 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param settings 列的相关设定
* @return {@link SQLUpdateAction}
*/
default SQLAction<Long> addColumn(@NotNull String columnName, @NotNull String settings) {
default SQLAction<Integer> addColumn(@NotNull String columnName, @NotNull String settings) {
return addColumn(columnName, settings, null);
}
@@ -63,21 +63,21 @@ public interface TableAlterBuilder extends SQLBuilder {
* <p> 若为 "" 则置于首行。
* @return {@link SQLUpdateAction}
*/
SQLAction<Long> addColumn(@NotNull String columnName, @NotNull String settings, @Nullable String afterColumn);
SQLAction<Integer> addColumn(@NotNull String columnName, @NotNull String settings, @Nullable String afterColumn);
SQLAction<Long> renameColumn(@NotNull String columnName, @NotNull String newName);
SQLAction<Integer> renameColumn(@NotNull String columnName, @NotNull String newName);
SQLAction<Long> modifyColumn(@NotNull String columnName, @NotNull String settings);
SQLAction<Integer> modifyColumn(@NotNull String columnName, @NotNull String settings);
default SQLAction<Long> modifyColumn(@NotNull String columnName, @NotNull String columnSettings, @NotNull String afterColumn) {
default SQLAction<Integer> modifyColumn(@NotNull String columnName, @NotNull String columnSettings, @NotNull String afterColumn) {
return modifyColumn(columnName, columnSettings + " AFTER `" + afterColumn + "`");
}
SQLAction<Long> removeColumn(@NotNull String columnName);
SQLAction<Integer> removeColumn(@NotNull String columnName);
SQLAction<Long> setColumnDefault(@NotNull String columnName, @NotNull String defaultValue);
SQLAction<Integer> setColumnDefault(@NotNull String columnName, @NotNull String defaultValue);
SQLAction<Long> removeColumnDefault(@NotNull String columnName);
SQLAction<Integer> removeColumnDefault(@NotNull String columnName);
/**
* 为该表添加一个自增列
@@ -90,7 +90,7 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param unsigned 是否采用 UNSIGNED (即无负数,可以增加自增键的最高数,建议为true)
* @return {@link TableCreateBuilder}
*/
default SQLAction<Long> addAutoIncrementColumn(@NotNull String columnName, @Nullable NumberType numberType,
default SQLAction<Integer> addAutoIncrementColumn(@NotNull String columnName, @Nullable NumberType numberType,
boolean primary, boolean unsigned) {
return addColumn(columnName,
(numberType == null ? NumberType.INT : numberType).name()
@@ -109,7 +109,7 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param numberType 数字类型,若省缺则为 {@link NumberType#INT}
* @return {@link TableAlterBuilder}
*/
default SQLAction<Long> addAutoIncrementColumn(@NotNull String columnName, @NotNull NumberType numberType) {
default SQLAction<Integer> addAutoIncrementColumn(@NotNull String columnName, @NotNull NumberType numberType) {
return addAutoIncrementColumn(columnName, numberType, false, true);
}
@@ -122,7 +122,7 @@ public interface TableAlterBuilder extends SQLBuilder {
* @param columnName 列名
* @return {@link TableAlterBuilder}
*/
default SQLAction<Long> addAutoIncrementColumn(@NotNull String columnName) {
default SQLAction<Integer> addAutoIncrementColumn(@NotNull String columnName) {
return addAutoIncrementColumn(columnName, NumberType.INT);
}
@@ -21,7 +21,7 @@ public interface TableCreateBuilder extends SQLBuilder {
*
* @return {@link SQLUpdateAction}
*/
SQLUpdateAction build();
SQLUpdateAction<Integer> build();
@NotNull String getTableName();
@@ -250,7 +250,7 @@ public interface TableCreateBuilder extends SQLBuilder {
@Nullable ForeignKeyRule updateRule, @Nullable ForeignKeyRule deleteRule);
default String defaultTablesSettings() {
return "ENGINE=InnoDB DEFAULT CHARSET=utf8";
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4";
}
}
@@ -0,0 +1,56 @@
package cc.carm.lib.easysql.api.builder;
import cc.carm.lib.easysql.api.SQLBuilder;
import cc.carm.lib.easysql.api.function.SQLFunction;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
import java.sql.ResultSet;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
public interface TableMetadataBuilder extends SQLBuilder {
/**
* @return 本表是否存在
*/
CompletableFuture<Boolean> validateExist();
/**
* 对表内的数据列元数据进行读取
*
* @param columnPattern 列的名称匹配表达式, 为空则匹配所有列
* @param reader 读取的方法
* @param <R> 结果类型
* @return 读取结果
*/
<R> CompletableFuture<R> fetchColumns(@Nullable String columnPattern,
@NotNull SQLFunction<ResultSet, R> reader);
/**
* @param columnPattern 需要判断的列名表达式
* @return 对应列是否存在
*/
CompletableFuture<Boolean> isColumnExists(@NotNull String columnPattern);
/**
* 列出所有表内的全部列。
*
* @return 表内全部数据列的列名
*/
default CompletableFuture<@Unmodifiable Set<String>> listColumns() {
return listColumns(null);
}
/**
* 列出所有满足表达式的列。
*
* @param columnPattern 列名表达式,为空则列出全部
* @return 所有满足表达式的列名
*/
CompletableFuture<@Unmodifiable Set<String>> listColumns(@Nullable String columnPattern);
// More coming soon.
}
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.LinkedHashMap;
public interface UpdateBuilder extends ConditionalBuilder<UpdateBuilder, SQLAction<Long>> {
public interface UpdateBuilder extends ConditionalBuilder<UpdateBuilder, SQLAction<Integer>> {
String getTableName();
@@ -0,0 +1,58 @@
package cc.carm.lib.easysql.api.enums;
/**
* 2022/11/28<br>
* EasySQL<br>
*
* @author huanmeng_qwq
*/
public class MigrateResult {
/**
* 旧表不存在
*/
public static final MigrateResult OLD_TABLE_NOT_EXIST = new MigrateResult(true);
/**
* 新表已存在
*/
public static final MigrateResult NEW_TABLE_EXIST = new MigrateResult(false);
/**
* 新表字段为空
*/
public static final MigrateResult NEW_COLUMN_EMPTY = new MigrateResult(false);
/**
* 旧表字段为在新表这设置对应的字段名
*/
public static final MigrateResult COLUMN_NOT_SET = new MigrateResult(false);
/**
* 迁移成功
*/
public static final MigrateResult SUCCESS = new MigrateResult(true);
private final boolean success;
private Throwable error;
MigrateResult(boolean success) {
this.success = success;
}
public MigrateResult(boolean success, Throwable error) {
this.success = success;
this.error = error;
}
public static MigrateResult from(MigrateResult migrateResult, Throwable error) {
return new MigrateResult(migrateResult.success, error);
}
public boolean success() {
return success;
}
public Throwable error() {
return error;
}
}
@@ -0,0 +1,24 @@
package cc.carm.lib.easysql.api.function;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.Objects;
@FunctionalInterface
public interface SQLBiFunction<T, U, R> {
@Nullable
R apply(@NotNull T t, @NotNull U u) throws SQLException;
default <V> SQLBiFunction<T, U, V> then(@NotNull SQLFunction<? super R, ? extends V> after) {
Objects.requireNonNull(after);
return (T t, U u) -> {
R r = apply(t, u);
if (r == null) return null;
else return after.apply(r);
};
}
}
@@ -10,6 +10,7 @@ import org.slf4j.Logger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* 异常处理器。
@@ -30,11 +31,11 @@ public interface SQLDebugHandler {
/**
* 该方法将在 {@link SQLQuery#close()} 执行后调用。
*
* @param query {@link SQLQuery} 对象
* @param executeTime 该次查询开始执行的时间
* @param closeTime 该次查询彻底关闭的时间
* @param query {@link SQLQuery} 对象
* @param executeNanoTime 该次查询开始执行的时间 (单位:纳秒)
* @param closeNanoTime 该次查询彻底关闭的时间 (单位:纳秒)
*/
void afterQuery(@NotNull SQLQuery query, long executeTime, long closeTime);
void afterQuery(@NotNull SQLQuery query, long executeNanoTime, long closeNanoTime);
default String parseParams(@Nullable Object[] params) {
if (params == null) return "<#NULL>";
@@ -51,40 +52,46 @@ public interface SQLDebugHandler {
@SuppressWarnings("DuplicatedCode")
static SQLDebugHandler defaultHandler(Logger logger) {
return new SQLDebugHandler() {
@Override
public void beforeExecute(@NotNull SQLAction<?> action, @NotNull List<@Nullable Object[]> params) {
logger.info("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
logger.info("┣# ActionUUID: {}", action.getActionUUID());
logger.info("┣# ActionType: {}", action.getClass().getName());
logger.info("┣# ActionType: {}", action.getClass().getSimpleName());
if (action.getSQLContents().size() == 1) {
logger.info("┣# SQLContent: {}", action.getSQLContents().get(0));
} else {
logger.info("┣# SQLContents: ");
int i = 0;
for (String sqlContent : action.getSQLContents()) {
logger.info("┃ [{}] {}", ++i, sqlContent);
logger.info(" - [{}] {}", ++i, sqlContent);
}
}
if (params.size() == 1) {
Object[] param = params.get(0);
logger.info("┣# SQLParams: {}", parseParams(param));
if (param != null) {
logger.info("┣# SQLParam: {}", parseParams(param));
}
} else if (params.size() > 1) {
logger.info("┣# SQLParams: ");
int i = 0;
for (Object[] param : params) {
logger.info("┃ [{}] {}", ++i, parseParams(param));
logger.info(" - [{}] {}", ++i, parseParams(param));
}
}
logger.info("┣# createTime: {}", action.getCreateTime());
logger.info("┣# CreateTime: {}", action.getCreateTime(TimeUnit.MILLISECONDS));
logger.info("┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
}
@Override
public void afterQuery(@NotNull SQLQuery query, long executeTime, long closeTime) {
public void afterQuery(@NotNull SQLQuery query, long executeNanoTime, long closeNanoTime) {
logger.info("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
logger.info("┣# ActionUUID: {}", query.getAction().getActionUUID());
logger.info("┣# SQLContent: {}", query.getSQLContent());
logger.info("┣# executeCost: {} ms", (closeTime - executeTime));
logger.info("┣# CloseTime: {} (cost {} ms)",
TimeUnit.NANOSECONDS.toMillis(closeNanoTime),
((double) (closeNanoTime - executeNanoTime) / 1000000)
);
logger.info("┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
}
};
@@ -4,6 +4,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.Objects;
@FunctionalInterface
public interface SQLFunction<T, R> {
@@ -11,4 +12,23 @@ public interface SQLFunction<T, R> {
@Nullable
R apply(@NotNull T t) throws SQLException;
default <V> SQLFunction<V, R> compose(@NotNull SQLFunction<? super V, ? extends T> before) {
Objects.requireNonNull(before);
return (V v) -> {
T t = before.apply(v);
if (t == null) return null;
else return apply(t);
};
}
default <V> SQLFunction<T, V> then(@NotNull SQLFunction<? super R, ? extends V> after) {
Objects.requireNonNull(after);
return (T t) -> {
R r = apply(t);
if (r == null) return null;
else return after.apply(r);
};
}
}
@@ -0,0 +1,70 @@
package cc.carm.lib.easysql.api.migrate;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.MigrateResult;
import org.jetbrains.annotations.Contract;
import java.sql.SQLException;
/**
* 将现有的表结构与数据迁移之新的表中
*
* @author huanmeng_qwq
* @since 0.4.7
*/
public interface SQLMigrate {
/**
* 为迁移工作定义前后的表名信息
*
* @param oldTableName 旧表名
* @param newTableName 新表名
* @param newTableSettings 新表的设置
* @return {@link SQLMigrate}
*/
@Contract("null,_,_ -> fail;!null,_,_ -> this")
SQLMigrate tableName(String oldTableName, String newTableName, String newTableSettings);
/**
* 为迁移工作定义前后的列名信息
*
* @param oldColumnName 旧列名
* @param newColumnName 新列名
* @param newColumnSettings 新列的设置
* @return {@link SQLMigrate}
*/
@Contract("null,_,_ -> fail;!null,_,_ -> this")
default SQLMigrate column(String oldColumnName, String newColumnName, String newColumnSettings) {
return column(oldColumnName, newColumnName, newColumnSettings, null);
}
/**
* 为迁移工作定义前后的列名信息
*
* @param oldColumnName 旧列名
* @param newColumnName 新列名
* @param newColumnSettings 新列的设置
* @param indexType 索引类型
* @return {@link SQLMigrate}
*/
@Contract("null,_,_,_ -> fail;!null,_,_,_ -> this")
SQLMigrate column(String oldColumnName, String newColumnName, String newColumnSettings, IndexType indexType);
/**
* 为迁移工作定义前后的自增列名信息
*
* @param oldColumnName 旧列名
* @param newColumnName 新列名
* @return {@link SQLMigrate}
*/
@Contract("null,_->fail;!null,_ -> this")
SQLMigrate autoIncrementColumn(String oldColumnName, String newColumnName);
/**
* 迁移数据
*
* @return {@link MigrateResult}
*/
MigrateResult migrate() throws SQLException;
}
@@ -0,0 +1,50 @@
package cc.carm.lib.easysql.api.table;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLTable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
public abstract class NamedSQLTable implements SQLTable {
private final @NotNull String tableName;
protected @Nullable String tablePrefix;
protected @Nullable SQLManager manager;
/**
* 请调用 {@link NamedSQLTable} 下的静态方法进行对象的初始化。
*
* @param tableName 该表的名称
*/
public NamedSQLTable(@NotNull String tableName) {
this.tableName = tableName;
}
public @NotNull String getTableName() {
return (tablePrefix != null ? tablePrefix : "") + tableName;
}
@Override
public @Nullable SQLManager getSQLManager() {
return this.manager;
}
/**
* 使用指定 SQLManager 进行本示例的初始化。
*
* @param sqlManager {@link SQLManager}
* @param tablePrefix 表名前缀
* @return 本表是否为首次创建
* @throws SQLException 出现任何错误时抛出
*/
public abstract boolean create(@NotNull SQLManager sqlManager, @Nullable String tablePrefix) throws SQLException;
public boolean create(@NotNull SQLManager sqlManager) throws SQLException {
return create(sqlManager, null);
}
}
+5 -9
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.17</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,7 +17,7 @@
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.deploy.skip>true</maven.deploy.skip>
<log4j.version>2.17.2</log4j.version>
<log4j.version>2.25.3</log4j.version>
</properties>
<artifactId>easysql-demo</artifactId>
@@ -69,37 +69,32 @@
<!--项目地址 https://github.com/brettwooldridge/HikariCP/ -->
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
<scope>test</scope>
<version>7.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.212</version>
<scope>test</scope>
<version>2.4.240</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -120,4 +115,5 @@
</plugin>
</plugins>
</build>
</project>
+52
View File
@@ -0,0 +1,52 @@
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLTable;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.NumberType;
import cc.carm.lib.easysql.api.table.NamedSQLTable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
public enum DataTables1 {
DATA(SQLTable.of("data", (table) -> {
table.addAutoIncrementColumn("id", true);
table.addColumn("user", "INT UNSIGNED NOT NULL");
table.addColumn("content", "TEXT NOT NULL");
table.addColumn("time", "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP");
})),
USER(SQLTable.of("user", (table) -> {
table.addAutoIncrementColumn("id", NumberType.INT, true, true);
table.addColumn("uuid", "VARCHAR(32) NOT NULL UNIQUE KEY");
table.addColumn("username", "VARCHAR(16) NOT NULL");
table.addColumn("age", "TINYINT NOT NULL DEFAULT 1");
table.addColumn("email", "VARCHAR(32)");
table.addColumn("phone", "VARCHAR(16)");
table.addColumn("registerTime", "DATETIME NOT NULL");
table.setIndex("username", IndexType.UNIQUE_KEY); // 添加唯一索引
table.setIndex(IndexType.INDEX, "contact", "email", "phone"); //添加联合索引 (示例)
}));
private final NamedSQLTable table;
DataTables1(NamedSQLTable table) {
this.table = table;
}
public NamedSQLTable get() {
return this.table;
}
public static void initialize(@NotNull SQLManager manager, @Nullable String tablePrefix) {
for (DataTables1 value : values()) {
try {
value.get().create(manager, tablePrefix);
} catch (SQLException e) {
// 提示异常
}
}
}
}
+69
View File
@@ -0,0 +1,69 @@
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLTable;
import cc.carm.lib.easysql.api.builder.TableCreateBuilder;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.NumberType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.function.Consumer;
public enum DataTables2 implements SQLTable {
USER((table) -> {
table.addAutoIncrementColumn("id", NumberType.INT, true, true);
table.addColumn("uuid", "VARCHAR(32) NOT NULL UNIQUE KEY");
table.addColumn("username", "VARCHAR(16) NOT NULL");
table.addColumn("age", "TINYINT NOT NULL DEFAULT 1");
table.addColumn("email", "VARCHAR(32)");
table.addColumn("phone", "VARCHAR(16)");
table.addColumn("registerTime", "DATETIME NOT NULL");
table.setIndex("username", IndexType.UNIQUE_KEY); // 添加唯一索引
table.setIndex(IndexType.INDEX, "contact", "email", "phone"); //添加联合索引 (示例)
});
private final Consumer<TableCreateBuilder> builder;
private @Nullable String tablePrefix;
private @Nullable SQLManager manager;
DataTables2(Consumer<TableCreateBuilder> builder) {
this.builder = builder;
}
@Override
public @Nullable SQLManager getSQLManager() {
return this.manager;
}
@Override
public @NotNull String getTableName() {
// 这里直接选择用枚举的名称作为table的主名称
return (tablePrefix != null ? tablePrefix : "") + name().toLowerCase();
}
@Override
public boolean create(SQLManager sqlManager) throws SQLException {
return create(sqlManager, null);
}
public boolean create(@NotNull SQLManager sqlManager, @Nullable String tablePrefix) throws SQLException {
if (this.manager == null) this.manager = sqlManager;
this.tablePrefix = tablePrefix;
TableCreateBuilder tableBuilder = sqlManager.createTable(getTableName());
if (builder != null) builder.accept(tableBuilder);
return tableBuilder.build().executeFunction(l -> l > 0, false);
}
public static void initialize(@NotNull SQLManager manager, @Nullable String tablePrefix) {
for (DataTables2 value : values()) {
try {
value.create(manager, tablePrefix);
} catch (SQLException e) {
// 提示异常
}
}
}
}
+23 -3
View File
@@ -8,9 +8,11 @@ import cc.carm.lib.easysql.api.util.TimeDateUtils;
import cc.carm.lib.easysql.api.util.UUIDUtil;
import org.jetbrains.annotations.TestOnly;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@TestOnly
@SuppressWarnings("all")
@@ -134,10 +136,10 @@ public class EasySQLDemo {
public void sqlInsert(SQLManager sqlManager) {
// 同步SQL插入 (不使用try-catch的情况下,返回的数值可能为空。)
Long id = sqlManager.createInsert("users")
int id = sqlManager.createInsert("users")
.setColumnNames("username", "phone", "email", "registerTime")
.setParams("CarmJos", "18888888888", "carm@carm.cc", TimeDateUtils.getCurrentTime())
.setReturnGeneratedKey(true)// 设定在后续返回自增主键
.returnGeneratedKey() // 设定在后续返回自增主键
.execute((exception, action) -> {
// 处理异常
System.out.println("#" + action.getShortID() + " -> " + action.getSQLContent());
@@ -145,7 +147,7 @@ public class EasySQLDemo {
});
try {
Long userID = sqlManager.createInsert("users")
int userID = sqlManager.createInsert("users")
.setColumnNames("username", "phone", "email", "registerTime")
.setParams("CarmJos", "18888888888", "carm@carm.cc", TimeDateUtils.getCurrentTime())
.returnGeneratedKey().execute();
@@ -157,4 +159,22 @@ public class EasySQLDemo {
}
}
public void metadata(SQLManager sql) {
// 操作数据库元数据,直接返回结果。
CompletableFuture<Boolean> roFuture = sql.fetchMetadata(DatabaseMetaData::isReadOnly);
CompletableFuture<Integer> maxColumnFuture = sql.fetchMetadata(DatabaseMetaData::getMaxColumnsInSelect);
// 操作有 ResultSet 元数据。该方法会自动关闭ResultSet。
CompletableFuture<Boolean> tableExists = sql.fetchMetadata(
meta -> meta.getTables(null, null, "表名", new String[]{"TABKE"}),
resultSet -> resultSet.next()
);
// SQLManager附带了几个常用元数据的获取方法。
CompletableFuture<Boolean> tableExists2 = sql.fetchTableMetadata("表名").validateExist();
CompletableFuture<Boolean> columnExists = sql.fetchTableMetadata("表名").isColumnExists("字段名");
}
}
@@ -6,6 +6,8 @@ import cc.carm.lib.easysql.tests.*;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.LinkedHashSet;
@@ -13,16 +15,29 @@ import java.util.Set;
public class EasySQLTest {
protected SQLManager sqlManager;
@Test
public void onTest() {
@Before
public void initialize() {
HikariConfig config = new HikariConfig();
config.setDriverClassName("org.h2.Driver");
config.setJdbcUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=MYSQL;");
SQLManager sqlManager = new SQLManagerImpl(new HikariDataSource(config), "test");
sqlManager.setDebugMode(true);
this.sqlManager = new SQLManagerImpl(new HikariDataSource(config), "test");
this.sqlManager.setDebugMode(true);
}
@After
public void shutdown() {
if (sqlManager.getDataSource() instanceof HikariDataSource) {
//Close bee connection pool
((HikariDataSource) sqlManager.getDataSource()).close();
}
}
@Test
public void onTest() {
print("加载测试类...");
Set<TestHandler> tests = new LinkedHashSet<>();
@@ -30,11 +45,18 @@ public class EasySQLTest {
// tests.add(new TableAlterTest());
// tests.add(new TableRenameTest());
// tests.add(new QueryNotCloseTest());
tests.add(new QueryCloseTest());
tests.add(new SQLUpdateBatchTests());
tests.add(new SQLUpdateReturnKeysTest());
tests.add(new QueryCloseTest());
tests.add(new QueryFunctionTest());
tests.add(new DeleteTest());
tests.add(new QueryFutureTest());
tests.add(new QueryAsyncTest());
tests.add(new TableMetadataTest());
// tests.add(new DeleteTest());
tests.add(new TableMigrateTest());
print("准备进行测试...");
@@ -61,10 +83,6 @@ public class EasySQLTest {
success, (tests.size() - success)
);
if (sqlManager.getDataSource() instanceof HikariDataSource) {
//Close bee connection pool
((HikariDataSource) sqlManager.getDataSource()).close();
}
}
@@ -4,8 +4,6 @@ import cc.carm.lib.easysql.api.SQLManager;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import java.sql.SQLException;
public abstract class TestHandler {
protected static void print(@NotNull String format, Object... params) {
@@ -13,7 +11,7 @@ public abstract class TestHandler {
}
@ApiStatus.OverrideOnly
public abstract void onTest(SQLManager sqlManager) throws SQLException;
public abstract void onTest(SQLManager sqlManager) throws Exception;
public boolean executeTest(int index, SQLManager sqlManager) {
String testName = getClass().getSimpleName();
@@ -0,0 +1,33 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import java.sql.SQLException;
public class QueryAsyncTest extends TestHandler {
@Override
public void onTest(SQLManager sqlManager) throws SQLException {
sqlManager.createQuery()
.inTable("test_user_table")
.orderBy("id", false)
.setLimit(1)
.build().executeAsync(query -> {
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
if (!query.getResultSet().next()) {
System.out.println("id (ps): NULL");
} else {
System.out.println("id (ps): " + query.getResultSet().getInt("id"));
}
});
}
}
@@ -1,9 +1,10 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLQuery;
import cc.carm.lib.easysql.TestHandler;
import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -24,7 +25,7 @@ public class QueryCloseTest extends TestHandler {
System.out.printf(
"id: %d username: %s%n",
resultSet.getInt("id"),
resultSet.getObject("id", BigInteger.class),
resultSet.getString("username")
);
@@ -16,6 +16,11 @@ public class QueryFunctionTest extends TestHandler {
.orderBy("id", false)
.setLimit(1)
.build().executeFunction(query -> {
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
if (!query.getResultSet().next()) return -1;
else return query.getResultSet().getInt("id");
});
@@ -0,0 +1,33 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import java.sql.SQLException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
public class QueryFutureTest extends TestHandler {
@Override
public void onTest(SQLManager sqlManager) throws SQLException, ExecutionException, InterruptedException {
Future<Integer> future = sqlManager.createQuery()
.inTable("test_user_table")
.orderBy("id", false)
.setLimit(1)
.build().executeFuture((query) -> {
if (!query.getResultSet().next()) {
return -1;
} else {
return query.getResultSet().getInt("id");
}
});
int id = future.get();
System.out.println("id(future): " + id);
}
}
@@ -1,8 +1,8 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLQuery;
import cc.carm.lib.easysql.TestHandler;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -1,7 +1,7 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import java.sql.SQLException;
import java.util.Arrays;
@@ -28,6 +28,7 @@ public class SQLUpdateBatchTests extends TestHandler {
List<Long> updates = sqlManager.createInsertBatch("test_user_table")
.setColumnNames("uuid", "username", "age")
.setAllParams(generateParams())
.returnGeneratedKeys(Long.class)
.execute();
System.out.println("changes " + Arrays.toString(updates.toArray()));
@@ -11,10 +11,10 @@ public class SQLUpdateReturnKeysTest extends SQLUpdateBatchTests {
@Override
public void onTest(SQLManager sqlManager) throws SQLException {
List<Long> generatedKeys = sqlManager.createInsertBatch("test_user_table")
List<Integer> generatedKeys = sqlManager.createInsertBatch("test_user_table")
.setColumnNames("uuid", "username", "age")
.setAllParams(generateParams())
.returnGeneratedKeys()
.returnGeneratedKeys(Integer.class)
.execute();
System.out.println("generated " + Arrays.toString(generatedKeys.toArray()));
@@ -1,8 +1,8 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.enums.NumberType;
import cc.carm.lib.easysql.TestHandler;
import java.sql.SQLException;
@@ -1,9 +1,9 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.enums.ForeignKeyRule;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.TestHandler;
import java.sql.SQLException;
@@ -0,0 +1,39 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
public class TableMetadataTest extends TestHandler {
@Override
public void onTest(SQLManager sqlManager) throws Exception {
print(" 获取数据库中所有的表");
CompletableFuture<List<String>> tables = sqlManager.fetchMetadata(
(meta) -> meta.getTables(null, null, "%", new String[]{"TABLE"}),
(rs) -> {
List<String> data = new ArrayList<>();
while (rs.next()) {
data.add(rs.getString("TABLE_NAME"));
}
return data;
}
);
print("表名:" + Arrays.toString(tables.get().toArray()));
print(" 获取数据库中所有的列");
CompletableFuture<Set<String>> columns = sqlManager.fetchTableMetadata("test%").listColumns();
print("列名:" + Arrays.toString(columns.get().toArray()));
print("表是否存在 " + sqlManager.fetchTableMetadata("test_user_info").validateExist().get());
print("列是否存在 " + sqlManager.fetchTableMetadata("test_user_info").isColumnExists("uid").get());
}
}
@@ -0,0 +1,70 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLQuery;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.MigrateResult;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 2022/11/28<br>
* EasySQL<br>
*
* @author huanmeng_qwq
*/
public class TableMigrateTest extends TestHandler {
@Override
public void onTest(SQLManager sqlManager) throws Exception {
print(" 创建 test_migrate_table");
sqlManager.createTable("test_migrate_table")
.addAutoIncrementColumn("id")
.addColumn("uuid", "VARCHAR(36) NOT NULL", "用户UUID")
.addColumn("username", "VARCHAR(16) NOT NULL", "用户名")
.addColumn("age", "TINYINT DEFAULT 0 NOT NULL", "年龄")
.setIndex("uuid", IndexType.UNIQUE_KEY)
.build().execute();
print(" 向 test_migrate_table 写入数据");
sqlManager.createInsert("test_migrate_table")
.setColumnNames("uuid", "username", "age")
.setParams("1234567890", "qwq", 18)
.execute();
print(" 迁移 test_migrate_table 至 test_transfer_table");
MigrateResult migrate = sqlManager.createMigrate()
.tableName("test_migrate_table", "test_transfer_table", null)
.autoIncrementColumn("id", "dbId")
.column("uuid", "uniqueId", "VARCHAR(40) NOT NULL")
.column("username", "name", "VARCHAR(20) NOT NULL")
.column("age", "age", "TINYINT DEFAULT 0 NOT NULL")
.migrate();
if (migrate.error() != null) {
migrate.error().printStackTrace();
}
Set<String> set = sqlManager.fetchTableMetadata("test_transfer_table").listColumns().join()
.stream()
.map(String::toLowerCase)
.collect(Collectors.toSet());
print(" 迁移后的表结构: " + set);
boolean containsAll = set.containsAll(Stream.of
("dbId", "uniqueId", "name", "age").map(String::toLowerCase).collect(Collectors.toSet()));
print(" 迁移结果: " + (migrate.success() ? "true" : migrate.error()) + " , 是否包含所有字段: " + containsAll);
try (SQLQuery query = sqlManager.createQuery().inTable("test_transfer_table").build().execute()) {
while (query.getResultSet().next()) {
print(" 迁移后的数据: " +
query.getResultSet().getInt("dbId") + " , " +
query.getResultSet().getString("uniqueId") + " , " +
query.getResultSet().getString("name") + " , " +
query.getResultSet().getInt("age")
);
}
}
}
}
@@ -1,7 +1,7 @@
package cc.carm.lib.easysql.tests;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.TestHandler;
import cc.carm.lib.easysql.api.SQLManager;
import java.sql.SQLException;
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="cc.carm.lib.easysql.EasySQLTest">
<Appenders>
<console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n"/>
</console>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<OnStartupTriggeringPolicy/>
</Policies>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<filters>
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL"/>
<RegexFilter regex=".*\$\{[^}]*\}.*" onMatch="DENY" onMismatch="NEUTRAL"/>
</filters>
<AppenderRef ref="File"/>
<appender-ref ref="Console"/>
</Root>
</Loggers>
</Configuration>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.17</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -2,6 +2,7 @@ package cc.carm.lib.easysql.action;
import cc.carm.lib.easysql.api.SQLAction;
import cc.carm.lib.easysql.api.function.SQLExceptionHandler;
import cc.carm.lib.easysql.api.function.SQLFunction;
import cc.carm.lib.easysql.api.function.SQLHandler;
import cc.carm.lib.easysql.manager.SQLManagerImpl;
import org.jetbrains.annotations.NotNull;
@@ -10,35 +11,37 @@ import java.sql.SQLException;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
public abstract class AbstractSQLAction<T> implements SQLAction<T> {
protected final @NotNull String sqlContent;
private final @NotNull SQLManagerImpl sqlManager;
private final @NotNull UUID uuid;
private final long createTime;
private final long createNanoTime;
public AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull String sql) {
this(manager, sql, System.currentTimeMillis());
this(manager, sql, System.nanoTime());
}
public AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull String sql, @NotNull UUID uuid) {
this(manager, sql, uuid, System.currentTimeMillis());
this(manager, sql, uuid, System.nanoTime());
}
public AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull String sql, long createTime) {
this(manager, sql, UUID.randomUUID(), createTime);
public AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull String sql, long createNanoTime) {
this(manager, sql, UUID.randomUUID(), createNanoTime);
}
public AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull String sql,
@NotNull UUID uuid, long createTime) {
@NotNull UUID uuid, long createNanoTime) {
Objects.requireNonNull(manager);
Objects.requireNonNull(sql);
Objects.requireNonNull(uuid);
this.sqlManager = manager;
this.sqlContent = sql;
this.uuid = uuid;
this.createTime = createTime;
this.createNanoTime = createNanoTime;
}
@@ -53,8 +56,8 @@ public abstract class AbstractSQLAction<T> implements SQLAction<T> {
}
@Override
public long getCreateTime() {
return this.createTime;
public long getCreateTime(TimeUnit unit) {
return unit.convert(createNanoTime, TimeUnit.NANOSECONDS);
}
@Override
@@ -90,4 +93,10 @@ public abstract class AbstractSQLAction<T> implements SQLAction<T> {
});
}
@Override
public @NotNull <R> CompletableFuture<R> executeFuture(@NotNull SQLFunction<T, R> handler) {
CompletableFuture<R> future = new CompletableFuture<>();
executeAsync((t -> future.complete(handler.apply(t))), (e, q) -> future.completeExceptionally(e));
return future;
}
}
@@ -12,22 +12,33 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
public class PreparedSQLBatchUpdateActionImpl
extends AbstractSQLAction<List<Long>>
implements PreparedSQLUpdateBatchAction {
public class PreparedSQLBatchUpdateActionImpl<T extends Number>
extends AbstractSQLAction<List<T>>
implements PreparedSQLUpdateBatchAction<T> {
boolean returnKeys = false;
@NotNull List<Object[]> allParams;
@NotNull List<Object[]> allParams = new ArrayList<>();
public PreparedSQLBatchUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull String sql) {
protected final @NotNull Class<T> numberClass;
public PreparedSQLBatchUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull String sql) {
super(manager, sql);
this.numberClass = numberClass;
this.allParams = new ArrayList<>();
}
public PreparedSQLBatchUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull UUID uuid, @NotNull String sql) {
super(manager, sql, uuid);
this.numberClass = numberClass;
}
@Override
public PreparedSQLUpdateBatchAction setAllParams(Iterable<Object[]> allParams) {
public PreparedSQLBatchUpdateActionImpl<T> setAllParams(Iterable<Object[]> allParams) {
List<Object[]> paramsList = new ArrayList<>();
allParams.forEach(paramsList::add);
this.allParams = paramsList;
@@ -35,35 +46,40 @@ public class PreparedSQLBatchUpdateActionImpl
}
@Override
public PreparedSQLUpdateBatchAction addParamsBatch(Object... params) {
public PreparedSQLBatchUpdateActionImpl<T> addParamsBatch(Object... params) {
this.allParams.add(params);
return this;
}
@Override
public PreparedSQLUpdateBatchAction setReturnGeneratedKeys(boolean returnGeneratedKey) {
this.returnKeys = returnGeneratedKey;
public PreparedSQLBatchUpdateActionImpl<T> returnGeneratedKeys() {
this.returnKeys = true;
return this;
}
@Override
public @NotNull List<Long> execute() throws SQLException {
public <N extends Number> PreparedSQLBatchUpdateActionImpl<N> returnGeneratedKeys(Class<N> keyTypeClass) {
return new PreparedSQLBatchUpdateActionImpl<>(getManager(), keyTypeClass, getActionUUID(), getSQLContent())
.setAllParams(allParams).returnGeneratedKeys();
}
@Override
public @NotNull List<T> execute() throws SQLException {
debugMessage(allParams);
try (Connection connection = getManager().getConnection()) {
try (PreparedStatement statement = StatementUtil.createPrepareStatementBatch(
connection, getSQLContent(), allParams, returnKeys
)) {
int[] executed = statement.executeBatch();
if (!returnKeys) {
return Arrays.stream(executed).mapToLong(Long::valueOf).boxed().collect(Collectors.toList());
return Arrays.stream(executed).mapToObj(numberClass::cast).collect(Collectors.toList());
} else {
try (ResultSet resultSet = statement.getGeneratedKeys()) {
List<Long> generatedKeys = new ArrayList<>();
List<T> generatedKeys = new ArrayList<>();
while (resultSet.next()) {
generatedKeys.add(resultSet.getLong(1));
generatedKeys.add(resultSet.getObject(1, numberClass));
}
return generatedKeys;
}
@@ -1,6 +1,7 @@
package cc.carm.lib.easysql.action;
import cc.carm.lib.easysql.api.action.PreparedSQLUpdateAction;
import cc.carm.lib.easysql.api.action.SQLUpdateAction;
import cc.carm.lib.easysql.manager.SQLManagerImpl;
import cc.carm.lib.easysql.util.StatementUtil;
import org.jetbrains.annotations.NotNull;
@@ -13,36 +14,45 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
public class PreparedSQLUpdateActionImpl
extends SQLUpdateActionImpl
implements PreparedSQLUpdateAction {
public class PreparedSQLUpdateActionImpl<T extends Number>
extends SQLUpdateActionImpl<T>
implements PreparedSQLUpdateAction<T> {
Object[] params;
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull String sql) {
this(manager, sql, (Object[]) null);
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull String sql) {
this(manager, numberClass, sql, (Object[]) null);
}
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull String sql,
@Nullable List<Object> params) {
this(manager, sql, params == null ? null : params.toArray());
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull String sql, @Nullable List<Object> params) {
this(manager, numberClass, sql, params == null ? null : params.toArray());
}
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull String sql,
@Nullable Object[] params) {
super(manager, sql);
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull String sql, @Nullable Object[] params) {
super(manager, numberClass, sql);
this.params = params;
}
public PreparedSQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull UUID uuid, @NotNull String sql,
Object[] params) {
super(manager, numberClass, uuid, sql);
this.params = params;
}
@Override
public PreparedSQLUpdateActionImpl setParams(Object... params) {
public PreparedSQLUpdateActionImpl<T> setParams(Object... params) {
this.params = params;
return this;
}
@Override
public PreparedSQLUpdateAction setParams(@Nullable Iterable<Object> params) {
public PreparedSQLUpdateActionImpl<T> setParams(@Nullable Iterable<Object> params) {
if (params == null) {
return setParams((Object[]) null);
} else {
@@ -53,7 +63,7 @@ public class PreparedSQLUpdateActionImpl
}
@Override
public @NotNull Long execute() throws SQLException {
public @NotNull T execute() throws SQLException {
debugMessage(Collections.singletonList(params));
try (Connection connection = getManager().getConnection()) {
@@ -63,10 +73,10 @@ public class PreparedSQLUpdateActionImpl
)) {
int changes = statement.executeUpdate();
if (!returnGeneratedKeys) return (long) changes;
if (!returnGeneratedKeys) return numberClass.cast(changes);
else {
try (ResultSet resultSet = statement.getGeneratedKeys()) {
return resultSet.next() ? resultSet.getLong(1) : -1;
return resultSet.next() ? resultSet.getObject(1, numberClass) : numberClass.cast(0);
}
}
@@ -75,4 +85,10 @@ public class PreparedSQLUpdateActionImpl
}
@Override
public <N extends Number> SQLUpdateAction<N> returnGeneratedKey(Class<N> keyTypeClass) {
PreparedSQLUpdateActionImpl<N> newAction = new PreparedSQLUpdateActionImpl<>(getManager(), keyTypeClass, getActionUUID(), getSQLContent(), params);
newAction.returnGeneratedKey();
return newAction;
}
}
@@ -9,42 +9,57 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.UUID;
public class SQLUpdateActionImpl
extends AbstractSQLAction<Long>
implements SQLUpdateAction {
public class SQLUpdateActionImpl<T extends Number>
extends AbstractSQLAction<T>
implements SQLUpdateAction<T> {
boolean returnGeneratedKeys = false;
protected final @NotNull Class<T> numberClass;
public SQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull String sql) {
protected boolean returnGeneratedKeys = false;
public SQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull String sql) {
super(manager, sql);
this.numberClass = numberClass;
}
public SQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull Class<T> numberClass,
@NotNull UUID uuid, @NotNull String sql) {
super(manager, sql, uuid);
this.numberClass = numberClass;
}
@Override
public @NotNull Long execute() throws SQLException {
public @NotNull T execute() throws SQLException {
debugMessage(new ArrayList<>());
try (Connection connection = getManager().getConnection()) {
try (Statement statement = connection.createStatement()) {
if (!returnGeneratedKeys) {
return (long) statement.executeUpdate(getSQLContent());
return numberClass.cast(statement.executeUpdate(getSQLContent()));
} else {
statement.executeUpdate(getSQLContent(), Statement.RETURN_GENERATED_KEYS);
try (ResultSet resultSet = statement.getGeneratedKeys()) {
return resultSet.next() ? resultSet.getLong(1) : -1;
return resultSet.next() ? resultSet.getObject(1, numberClass) : numberClass.cast(0);
}
}
}
}
}
@Override
public SQLUpdateAction setReturnGeneratedKey(boolean returnGeneratedKey) {
this.returnGeneratedKeys = returnGeneratedKey;
public SQLUpdateAction<T> returnGeneratedKey() {
this.returnGeneratedKeys = true;
return this;
}
@Override
public <N extends Number> SQLUpdateAction<N> returnGeneratedKey(Class<N> keyTypeClass) {
return new SQLUpdateActionImpl<>(getManager(), keyTypeClass, getActionUUID(), getSQLContent()).returnGeneratedKey();
}
}
@@ -51,7 +51,7 @@ public class PreparedQueryActionImpl extends QueryActionImpl implements Prepared
@Override
public @NotNull SQLQueryImpl execute() throws SQLException {
debugMessage(Collections.singletonList(params));
Connection connection = getManager().getConnection();
PreparedStatement preparedStatement;
try {
@@ -67,12 +67,10 @@ public class PreparedQueryActionImpl extends QueryActionImpl implements Prepared
}
try {
long executeTime = System.currentTimeMillis();
SQLQueryImpl query = new SQLQueryImpl(
getManager(), this,
connection, preparedStatement,
preparedStatement.executeQuery(),
executeTime
preparedStatement.executeQuery()
);
getManager().getActiveQuery().put(getActionUUID(), query);
return query;
@@ -35,12 +35,10 @@ public class QueryActionImpl extends AbstractSQLAction<SQLQuery> implements Quer
}
try {
long executeTime = System.currentTimeMillis();
SQLQueryImpl query = new SQLQueryImpl(
getManager(), this,
connection, statement,
statement.executeQuery(getSQLContent()),
executeTime
statement.executeQuery(getSQLContent())
);
getManager().getActiveQuery().put(getActionUUID(), query);
@@ -55,10 +53,12 @@ public class QueryActionImpl extends AbstractSQLAction<SQLQuery> implements Quer
@Override
public void executeAsync(SQLHandler<SQLQuery> success, SQLExceptionHandler failure) {
try (SQLQueryImpl query = execute()) {
if (success != null) success.accept(query);
} catch (SQLException exception) {
handleException(failure, exception);
}
getManager().getExecutorPool().submit(() -> {
try (SQLQueryImpl query = execute()) {
if (success != null) success.accept(query);
} catch (SQLException exception) {
handleException(failure, exception);
}
});
}
}
@@ -12,7 +12,7 @@ import java.util.Objects;
import static cc.carm.lib.easysql.api.SQLBuilder.withBackQuote;
public class DeleteBuilderImpl
extends AbstractConditionalBuilder<DeleteBuilder, SQLAction<Long>>
extends AbstractConditionalBuilder<DeleteBuilder, SQLAction<Integer>>
implements DeleteBuilder {
protected final String tableName;
@@ -24,7 +24,7 @@ public class DeleteBuilderImpl
}
@Override
public PreparedSQLUpdateAction build() {
public PreparedSQLUpdateAction<Integer> build() {
StringBuilder sqlBuilder = new StringBuilder();
@@ -33,9 +33,9 @@ public class DeleteBuilderImpl
if (hasConditions()) sqlBuilder.append(" ").append(buildConditionSQL());
if (limit > 0) sqlBuilder.append(" ").append(buildLimitSQL());
return new PreparedSQLUpdateActionImpl(
getManager(), sqlBuilder.toString(),
hasConditionParams() ? getConditionParams() : null
return new PreparedSQLUpdateActionImpl<>(
getManager(), Integer.class, sqlBuilder.toString(),
(hasConditionParams() ? getConditionParams() : null)
);
}
@@ -28,31 +28,25 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> renameTo(@NotNull String newTableName) {
public SQLAction<Integer> renameTo(@NotNull String newTableName) {
Objects.requireNonNull(newTableName, "table name could not be null");
return new SQLUpdateActionImpl(getManager(),
"ALTER TABLE " + withBackQuote(tableName) + " RENAME TO " + withBackQuote(newTableName)
);
return createAction("ALTER TABLE " + withBackQuote(tableName) + " RENAME TO " + withBackQuote(newTableName));
}
@Override
public SQLAction<Long> changeComment(@NotNull String newTableComment) {
public SQLAction<Integer> changeComment(@NotNull String newTableComment) {
Objects.requireNonNull(newTableComment, "table comment could not be null");
return new SQLUpdateActionImpl(getManager(),
"ALTER TABLE " + withBackQuote(getTableName()) + " COMMENT " + withQuote(newTableComment)
);
return createAction("ALTER TABLE " + withBackQuote(getTableName()) + " COMMENT " + withQuote(newTableComment));
}
@Override
public SQLAction<Long> setAutoIncrementIndex(int index) {
return new SQLUpdateActionImpl(getManager(),
"ALTER TABLE " + withBackQuote(getTableName()) + " AUTO_INCREMENT=" + index
);
public SQLAction<Integer> setAutoIncrementIndex(int index) {
return createAction("ALTER TABLE " + withBackQuote(getTableName()) + " AUTO_INCREMENT=" + index);
}
@Override
public SQLAction<Long> addIndex(@NotNull IndexType indexType, @Nullable String indexName,
@NotNull String columnName, @NotNull String... moreColumns) {
public SQLAction<Integer> addIndex(@NotNull IndexType indexType, @Nullable String indexName,
@NotNull String columnName, @NotNull String... moreColumns) {
Objects.requireNonNull(indexType, "indexType could not be null");
Objects.requireNonNull(columnName, "column names could not be null");
Objects.requireNonNull(moreColumns, "column names could not be null");
@@ -63,7 +57,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> dropIndex(@NotNull String indexName) {
public SQLAction<Integer> dropIndex(@NotNull String indexName) {
Objects.requireNonNull(indexName, "indexName could not be null");
return createAction(
"ALTER TABLE " + withBackQuote(getTableName()) + " DROP INDEX " + withBackQuote(indexName)
@@ -71,7 +65,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> dropForeignKey(@NotNull String keySymbol) {
public SQLAction<Integer> dropForeignKey(@NotNull String keySymbol) {
Objects.requireNonNull(keySymbol, "keySymbol could not be null");
return createAction(
"ALTER TABLE " + withBackQuote(getTableName()) + " DROP FOREIGN KEY " + withBackQuote(keySymbol)
@@ -79,14 +73,14 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> dropPrimaryKey() {
public SQLAction<Integer> dropPrimaryKey() {
return createAction(
"ALTER TABLE " + withBackQuote(getTableName()) + " DROP PRIMARY KEY"
);
}
@Override
public SQLAction<Long> addColumn(@NotNull String columnName, @NotNull String settings, @Nullable String afterColumn) {
public SQLAction<Integer> addColumn(@NotNull String columnName, @NotNull String settings, @Nullable String afterColumn) {
Objects.requireNonNull(columnName, "columnName could not be null");
Objects.requireNonNull(settings, "settings could not be null");
String orderSettings = null;
@@ -105,7 +99,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> renameColumn(@NotNull String columnName, @NotNull String newName) {
public SQLAction<Integer> renameColumn(@NotNull String columnName, @NotNull String newName) {
Objects.requireNonNull(columnName, "columnName could not be null");
Objects.requireNonNull(newName, "please specify new column name");
return createAction(
@@ -114,7 +108,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> modifyColumn(@NotNull String columnName, @NotNull String settings) {
public SQLAction<Integer> modifyColumn(@NotNull String columnName, @NotNull String settings) {
Objects.requireNonNull(columnName, "columnName could not be null");
Objects.requireNonNull(settings, "please specify new column settings");
return createAction(
@@ -123,7 +117,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> removeColumn(@NotNull String columnName) {
public SQLAction<Integer> removeColumn(@NotNull String columnName) {
Objects.requireNonNull(columnName, "columnName could not be null");
return createAction(
"ALTER TABLE " + withBackQuote(getTableName()) + " DROP " + withBackQuote(columnName)
@@ -131,7 +125,7 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> setColumnDefault(@NotNull String columnName, @NotNull String defaultValue) {
public SQLAction<Integer> setColumnDefault(@NotNull String columnName, @NotNull String defaultValue) {
Objects.requireNonNull(columnName, "columnName could not be null");
Objects.requireNonNull(defaultValue, "defaultValue could not be null, if you need to remove the default value, please use #removeColumnDefault().");
return createAction(
@@ -140,14 +134,14 @@ public class TableAlterBuilderImpl extends AbstractSQLBuilder implements TableAl
}
@Override
public SQLAction<Long> removeColumnDefault(@NotNull String columnName) {
public SQLAction<Integer> removeColumnDefault(@NotNull String columnName) {
Objects.requireNonNull(columnName, "columnName could not be null");
return createAction(
"ALTER TABLE " + withBackQuote(getTableName()) + " ALTER " + withBackQuote(columnName) + " DROP DEFAULT"
);
}
private SQLUpdateActionImpl createAction(@NotNull String sql) {
return new SQLUpdateActionImpl(getManager(), sql);
private SQLUpdateActionImpl<Integer> createAction(@NotNull String sql) {
return new SQLUpdateActionImpl<>(getManager(), Integer.class, sql);
}
}
@@ -75,7 +75,7 @@ public class TableCreateBuilderImpl extends AbstractSQLBuilder implements TableC
}
@Override
public SQLUpdateAction build() {
public SQLUpdateAction<Integer> build() {
StringBuilder createSQL = new StringBuilder();
createSQL.append("CREATE TABLE IF NOT EXISTS ").append(withBackQuote(tableName));
createSQL.append("(");
@@ -94,7 +94,7 @@ public class TableCreateBuilderImpl extends AbstractSQLBuilder implements TableC
createSQL.append(" COMMENT ").append(withQuote(tableComment));
}
return new SQLUpdateActionImpl(getManager(), createSQL.toString());
return new SQLUpdateActionImpl<>(getManager(), Integer.class, createSQL.toString());
}
@Override
@@ -0,0 +1,74 @@
package cc.carm.lib.easysql.builder.impl;
import cc.carm.lib.easysql.api.builder.TableMetadataBuilder;
import cc.carm.lib.easysql.api.function.SQLBiFunction;
import cc.carm.lib.easysql.api.function.SQLFunction;
import cc.carm.lib.easysql.builder.AbstractSQLBuilder;
import cc.carm.lib.easysql.manager.SQLManagerImpl;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
public class TableMetadataBuilderImpl
extends AbstractSQLBuilder
implements TableMetadataBuilder {
protected final @NotNull String tablePattern;
public TableMetadataBuilderImpl(@NotNull SQLManagerImpl manager, @NotNull String tablePattern) {
super(manager);
this.tablePattern = tablePattern;
}
@Override
public CompletableFuture<Boolean> validateExist() {
return validate((meta, conn) -> meta.getTables(conn.getCatalog(), conn.getSchema(), tablePattern.toUpperCase(), new String[]{"TABLE"}));
}
@Override
public <R> CompletableFuture<R> fetchColumns(@Nullable String columnPattern,
@NotNull SQLFunction<ResultSet, R> reader) {
return getManager().fetchMetadata((meta, conn) -> meta.getColumns(
conn.getCatalog(), conn.getSchema(), tablePattern.toUpperCase(),
Optional.ofNullable(columnPattern).map(String::toUpperCase).orElse("%")
), reader);
}
@Override
public CompletableFuture<Boolean> isColumnExists(@NotNull String columnPattern) {
return validate((meta, conn) -> meta.getColumns(
conn.getCatalog(), conn.getSchema(),
tablePattern.toUpperCase(), columnPattern.toUpperCase()
));
}
@Override
public CompletableFuture<Set<String>> listColumns(@Nullable String columnPattern) {
return fetchColumns(columnPattern, (rs) -> {
Set<String> data = new LinkedHashSet<>();
while (rs.next()) {
data.add(rs.getString("COLUMN_NAME"));
}
return Collections.unmodifiableSet(data);
});
}
/**
* fast validate EXISTS.
*
* @param supplier supplier to get result set
* @return result future
*/
private CompletableFuture<Boolean> validate(SQLBiFunction<DatabaseMetaData, Connection, ResultSet> supplier) {
return getManager().fetchMetadata(supplier, ResultSet::next);
}
}
@@ -13,7 +13,7 @@ import java.util.*;
import static cc.carm.lib.easysql.api.SQLBuilder.withBackQuote;
public class UpdateBuilderImpl
extends AbstractConditionalBuilder<UpdateBuilder, SQLAction<Long>>
extends AbstractConditionalBuilder<UpdateBuilder, SQLAction<Integer>>
implements UpdateBuilder {
protected final @NotNull String tableName;
@@ -27,7 +27,7 @@ public class UpdateBuilderImpl
}
@Override
public PreparedSQLUpdateAction build() {
public PreparedSQLUpdateAction<Integer> build() {
StringBuilder sqlBuilder = new StringBuilder();
@@ -47,7 +47,7 @@ public class UpdateBuilderImpl
if (limit > 0) sqlBuilder.append(" ").append(buildLimitSQL());
return new PreparedSQLUpdateActionImpl(getManager(), sqlBuilder.toString(), allParams);
return new PreparedSQLUpdateActionImpl<>(getManager(), Integer.class, sqlBuilder.toString(), allParams);
}
@Override
@@ -10,9 +10,13 @@ import cc.carm.lib.easysql.api.action.PreparedSQLUpdateAction;
import cc.carm.lib.easysql.api.action.PreparedSQLUpdateBatchAction;
import cc.carm.lib.easysql.api.action.SQLUpdateBatchAction;
import cc.carm.lib.easysql.api.builder.*;
import cc.carm.lib.easysql.api.function.SQLBiFunction;
import cc.carm.lib.easysql.api.function.SQLDebugHandler;
import cc.carm.lib.easysql.api.function.SQLExceptionHandler;
import cc.carm.lib.easysql.api.function.SQLFunction;
import cc.carm.lib.easysql.api.migrate.SQLMigrate;
import cc.carm.lib.easysql.builder.impl.*;
import cc.carm.lib.easysql.migrate.SQLMigrateImpl;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
@@ -20,11 +24,13 @@ import org.slf4j.LoggerFactory;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Supplier;
public class SQLManagerImpl implements SQLManager {
@@ -50,12 +56,7 @@ public class SQLManagerImpl implements SQLManager {
String managerName = "SQLManager" + (name != null ? "#" + name : "");
this.LOGGER = logger;
this.dataSource = dataSource;
this.executorPool = Executors.newFixedThreadPool(3, r -> {
Thread thread = new Thread(r, managerName);
thread.setDaemon(true);
return thread;
});
this.executorPool = SQLManager.defaultExecutorPool(managerName);
this.exceptionHandler = SQLExceptionHandler.detailed(getLogger());
this.debugHandler = SQLDebugHandler.defaultHandler(getLogger());
}
@@ -80,19 +81,19 @@ public class SQLManagerImpl implements SQLManager {
this.debugHandler = debugHandler;
}
public void debug(String msg) {
if (isDebugMode()) getLogger().info("[DEBUG] " + msg);
}
@Override
public Logger getLogger() {
return LOGGER;
}
public ExecutorService getExecutorPool() {
public @NotNull ExecutorService getExecutorPool() {
return executorPool;
}
public void setExecutorPool(@NotNull ExecutorService executorPool) {
this.executorPool = executorPool;
}
@Override
public @NotNull DataSource getDataSource() {
return this.dataSource;
@@ -120,20 +121,18 @@ public class SQLManagerImpl implements SQLManager {
}
@Override
public Long executeSQL(String sql) {
return new SQLUpdateActionImpl(this, sql).execute(null);
public Integer executeSQL(String sql) {
return new SQLUpdateActionImpl<>(this, Integer.class, sql).execute(null);
}
@Override
public Long executeSQL(String sql, Object[] params) {
return new PreparedSQLUpdateActionImpl(this, sql, params).execute(null);
public Integer executeSQL(String sql, Object[] params) {
return new PreparedSQLUpdateActionImpl<>(this, Integer.class, sql, params).execute(null);
}
@Override
public List<Long> executeSQLBatch(String sql, Iterable<Object[]> paramsBatch) {
return new PreparedSQLBatchUpdateActionImpl(this, sql)
.setAllParams(paramsBatch)
.execute(null);
public List<Integer> executeSQLBatch(String sql, Iterable<Object[]> paramsBatch) {
return new PreparedSQLBatchUpdateActionImpl<>(this, Integer.class, sql).setAllParams(paramsBatch).execute(null);
}
@Override
@@ -158,6 +157,30 @@ public class SQLManagerImpl implements SQLManager {
return action.execute(null);
}
@Override
public <R> CompletableFuture<R> fetchMetadata(@NotNull SQLBiFunction<DatabaseMetaData, Connection, R> reader) {
return CompletableFuture.supplyAsync(() -> {
try (Connection conn = getConnection()) {
return reader.apply(conn.getMetaData(), conn);
} catch (SQLException ex) {
throw new RuntimeException(ex);
}
}, this.executorPool);
}
@Override
public <R> CompletableFuture<R> fetchMetadata(@NotNull SQLBiFunction<DatabaseMetaData, Connection, ResultSet> supplier,
@NotNull SQLFunction<@NotNull ResultSet, R> reader) {
return fetchMetadata((meta, conn) -> {
try (ResultSet rs = supplier.apply(conn.getMetaData(), conn)) {
if (rs == null) throw new NullPointerException("Metadata返回的ResultSet为null。");
else return reader.apply(rs);
} catch (SQLException ex) {
throw new RuntimeException(ex);
}
});
}
@Override
public TableCreateBuilder createTable(@NotNull String tableName) {
return new TableCreateBuilderImpl(this, tableName);
@@ -168,47 +191,57 @@ public class SQLManagerImpl implements SQLManager {
return new TableAlterBuilderImpl(this, tableName);
}
@Override
public TableMetadataBuilder fetchTableMetadata(@NotNull String tablePattern) {
return new TableMetadataBuilderImpl(this, tablePattern);
}
@Override
public QueryBuilder createQuery() {
return new QueryBuilderImpl(this);
}
@Override
public InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch(@NotNull String tableName) {
return new InsertBuilderImpl<PreparedSQLUpdateBatchAction>(this, tableName) {
public SQLMigrate createMigrate() {
return new SQLMigrateImpl(this);
}
@Override
public InsertBuilder<PreparedSQLUpdateBatchAction<Integer>> createInsertBatch(@NotNull String tableName) {
return new InsertBuilderImpl<PreparedSQLUpdateBatchAction<Integer>>(this, tableName) {
@Override
public PreparedSQLUpdateBatchAction setColumnNames(List<String> columnNames) {
return new PreparedSQLBatchUpdateActionImpl(getManager(), buildSQL(getTableName(), columnNames));
public PreparedSQLUpdateBatchAction<Integer> setColumnNames(List<String> columnNames) {
return new PreparedSQLBatchUpdateActionImpl<>(getManager(), Integer.class, buildSQL(getTableName(), columnNames));
}
};
}
@Override
public InsertBuilder<PreparedSQLUpdateAction> createInsert(@NotNull String tableName) {
return new InsertBuilderImpl<PreparedSQLUpdateAction>(this, tableName) {
public InsertBuilder<PreparedSQLUpdateAction<Integer>> createInsert(@NotNull String tableName) {
return new InsertBuilderImpl<PreparedSQLUpdateAction<Integer>>(this, tableName) {
@Override
public PreparedSQLUpdateAction setColumnNames(List<String> columnNames) {
return new PreparedSQLUpdateActionImpl(getManager(), buildSQL(getTableName(), columnNames));
public PreparedSQLUpdateAction<Integer> setColumnNames(List<String> columnNames) {
return new PreparedSQLUpdateActionImpl<>(getManager(), Integer.class, buildSQL(getTableName(), columnNames));
}
};
}
@Override
public ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch(@NotNull String tableName) {
return new ReplaceBuilderImpl<PreparedSQLUpdateBatchAction>(this, tableName) {
public ReplaceBuilder<PreparedSQLUpdateBatchAction<Integer>> createReplaceBatch(@NotNull String tableName) {
return new ReplaceBuilderImpl<PreparedSQLUpdateBatchAction<Integer>>(this, tableName) {
@Override
public PreparedSQLUpdateBatchAction setColumnNames(List<String> columnNames) {
return new PreparedSQLBatchUpdateActionImpl(getManager(), buildSQL(getTableName(), columnNames));
public PreparedSQLUpdateBatchAction<Integer> setColumnNames(List<String> columnNames) {
return new PreparedSQLBatchUpdateActionImpl<>(getManager(), Integer.class, buildSQL(getTableName(), columnNames));
}
};
}
@Override
public ReplaceBuilder<PreparedSQLUpdateAction> createReplace(@NotNull String tableName) {
return new ReplaceBuilderImpl<PreparedSQLUpdateAction>(this, tableName) {
public ReplaceBuilder<PreparedSQLUpdateAction<Integer>> createReplace(@NotNull String tableName) {
return new ReplaceBuilderImpl<PreparedSQLUpdateAction<Integer>>(this, tableName) {
@Override
public PreparedSQLUpdateAction setColumnNames(List<String> columnNames) {
return new PreparedSQLUpdateActionImpl(getManager(), buildSQL(getTableName(), columnNames));
public PreparedSQLUpdateAction<Integer> setColumnNames(List<String> columnNames) {
return new PreparedSQLUpdateActionImpl<>(getManager(), Integer.class, buildSQL(getTableName(), columnNames));
}
};
}
@@ -0,0 +1,13 @@
package cc.carm.lib.easysql.migrate;
/**
* 2022/11/28<br>
* EasySQL<br>
*
* @author huanmeng_qwq
*/
public class AutoIncrementMigrateData extends MigrateData {
public AutoIncrementMigrateData(String name) {
super(name, null, null);
}
}
@@ -0,0 +1,33 @@
package cc.carm.lib.easysql.migrate;
import cc.carm.lib.easysql.api.enums.IndexType;
/**
* 2022/11/28<br>
* EasySQL<br>
*
* @author huanmeng_qwq
*/
public class MigrateData {
private final String name;
private final String settings;
private final IndexType indexType;
public MigrateData(String name, String settings, IndexType indexType) {
this.name = name;
this.settings = settings;
this.indexType = indexType;
}
public String name() {
return name;
}
public String settings() {
return settings;
}
public IndexType indexType() {
return indexType;
}
}
@@ -0,0 +1,148 @@
package cc.carm.lib.easysql.migrate;
import cc.carm.lib.easysql.api.SQLManager;
import cc.carm.lib.easysql.api.SQLQuery;
import cc.carm.lib.easysql.api.action.PreparedSQLUpdateAction;
import cc.carm.lib.easysql.api.builder.TableCreateBuilder;
import cc.carm.lib.easysql.api.enums.IndexType;
import cc.carm.lib.easysql.api.enums.MigrateResult;
import cc.carm.lib.easysql.api.migrate.SQLMigrate;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* 2022/11/28<br>
* EasySQL<br>
*
* @author huanmeng_qwq
*/
public class SQLMigrateImpl implements SQLMigrate {
private final SQLManager sqlManager;
private final Map<String, MigrateData> columnMap;
private String oldTableName;
private MigrateData newTableData;
public SQLMigrateImpl(SQLManager sqlManager) {
this.sqlManager = sqlManager;
this.columnMap = new LinkedHashMap<>();
}
@Override
public SQLMigrate tableName(String oldTableName, String newTableName, String newTableSettings) {
if (oldTableName == null) {
throw new IllegalArgumentException("oldTableName can not be null");
}
this.oldTableName = oldTableName;
this.newTableData = new MigrateData(newTableName, newTableSettings, null);
return this;
}
@Override
public SQLMigrate column(String oldColumnName, String newColumnName, String newColumnSettings, IndexType indexType) {
if (oldColumnName == null) {
throw new IllegalArgumentException("oldColumnName can not be null");
}
columnMap.put(oldColumnName, new MigrateData(newColumnName, newColumnSettings, indexType));
return this;
}
@Override
public SQLMigrate autoIncrementColumn(String oldColumnName, String newColumnName) {
if (oldColumnName == null) {
throw new IllegalArgumentException("oldColumnName can not be null");
}
columnMap.put(oldColumnName, new AutoIncrementMigrateData(newColumnName));
return this;
}
@Override
public MigrateResult migrate() throws SQLException {
if (oldTableName == null) {
return MigrateResult.from(MigrateResult.OLD_TABLE_NOT_EXIST, new IllegalArgumentException("oldTableName can not be null"));
}
if (newTableData == null) {
return MigrateResult.from(MigrateResult.NEW_TABLE_EXIST, new IllegalArgumentException("new table name can not be null"));
}
if (columnMap.isEmpty()) {
return MigrateResult.from(MigrateResult.NEW_COLUMN_EMPTY, new IllegalArgumentException("new column can not be empty"));
}
try {
// check table
Set<String> columns = sqlManager.fetchTableMetadata(oldTableName).listColumns().join();
for (String column : columns) {
if (columnMap.keySet().stream().noneMatch(k -> k.toLowerCase(Locale.ROOT).equals(column.toLowerCase(Locale.ROOT)))) {
return MigrateResult.from(MigrateResult.COLUMN_NOT_SET, new IllegalArgumentException("column " + column + " not set"));
}
}
// create new table
TableCreateBuilder table = sqlManager.createTable(newTableData.name());
if (newTableData.settings() != null) {
table.setTableSettings(newTableData.settings());
}
// add columns
for (Map.Entry<String, MigrateData> entry : columnMap.entrySet()) {
MigrateData migrateData = entry.getValue();
if (migrateData.name() == null) {
// ignore
continue;
}
if (migrateData instanceof AutoIncrementMigrateData) {
table.addAutoIncrementColumn(migrateData.name());
continue;
}
table.addColumn(migrateData.name(), migrateData.settings());
if (migrateData.indexType() != null) {
table.setIndex(migrateData.name(), migrateData.indexType());
}
}
table.build().execute();
// insert data
try (SQLQuery query = sqlManager.createQuery().inTable(oldTableName).build().execute()) {
insert(query.getResultSet());
}
} catch (SQLException e) {
return new MigrateResult(false, e);
}
return MigrateResult.SUCCESS;
}
private void insert(ResultSet resultSet) throws SQLException {
while (resultSet.next()) {
Map<String, String> columnNames = tableColumnNames();
PreparedSQLUpdateAction<Integer> updateAction = sqlManager.createInsert(newTableData.name()).setColumnNames(columnNames.values().toArray(new String[0]));
Object[] values = new Object[columnNames.size()];
int i = 0;
for (Map.Entry<String, String> entry : columnNames.entrySet()) {
values[i] = resultSet.getObject(entry.getKey());
++i;
}
updateAction.setParams(values);
updateAction.execute();
}
}
private Map<String, String> tableColumnNames() {
Map<String, String> map = new ConcurrentHashMap<>();
for (Map.Entry<String, MigrateData> entry : columnMap.entrySet()) {
MigrateData migrateData = entry.getValue();
if (migrateData.name() == null) {
// ignore
continue;
}
if (migrateData instanceof AutoIncrementMigrateData) {
continue;
}
map.put(entry.getKey(), migrateData.name());
}
return map;
}
}
@@ -8,22 +8,23 @@ import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.concurrent.TimeUnit;
public class SQLQueryImpl implements SQLQuery {
protected final long executeTime;
protected final SQLManagerImpl sqlManager;
final Connection connection;
final Statement statement;
final ResultSet resultSet;
protected final Connection connection;
protected final Statement statement;
protected final ResultSet resultSet;
protected QueryActionImpl queryAction;
public SQLQueryImpl(
SQLManagerImpl sqlManager, QueryActionImpl queryAction,
Connection connection, Statement statement, ResultSet resultSet
) {
this(sqlManager, queryAction, connection, statement, resultSet, System.currentTimeMillis());
this(sqlManager, queryAction, connection, statement, resultSet, System.nanoTime());
}
public SQLQueryImpl(
@@ -40,8 +41,8 @@ public class SQLQueryImpl implements SQLQuery {
}
@Override
public long getExecuteTime() {
return this.executeTime;
public long getExecuteTime(TimeUnit timeUnit) {
return timeUnit.convert(this.executeTime, TimeUnit.NANOSECONDS);
}
@Override
@@ -73,7 +74,7 @@ public class SQLQueryImpl implements SQLQuery {
if (getManager().isDebugMode()) {
try {
getManager().getDebugHandler().afterQuery(this, getExecuteTime(), System.currentTimeMillis());
getManager().getDebugHandler().afterQuery(this, getExecuteTime(TimeUnit.NANOSECONDS), System.nanoTime());
} catch (Exception ex) {
ex.printStackTrace();
}
+10 -10
View File
@@ -19,7 +19,7 @@
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<packaging>pom</packaging>
<version>0.3.17</version>
<version>0.4.7</version>
<modules>
<module>api</module>
@@ -116,7 +116,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<version>26.1.0</version>
<scope>provided</scope>
</dependency>
@@ -133,7 +133,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
@@ -153,7 +153,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.3.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
@@ -169,7 +169,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.12.0</version>
<configuration>
<classifier>javadoc</classifier>
<detectJavaApiLink>false</detectJavaApiLink>
@@ -196,7 +196,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.15.0</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
@@ -208,13 +208,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
@@ -228,7 +228,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
@@ -256,7 +256,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.5</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
+6
View File
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}
+3 -3
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.17</version>
<version>0.4.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -79,7 +79,7 @@
<!--项目地址 https://github.com/Chris2018998/BeeCP -->
<groupId>com.github.chris2018998</groupId>
<artifactId>beecp</artifactId>
<version>3.3.6</version>
<version>5.2.2</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
@@ -107,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
+3 -3
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.17</version>
<version>0.4.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -74,7 +74,7 @@
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<!--suppress MavenPackageUpdate -->
<version>4.0.3</version>
<version>7.0.2</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
@@ -102,7 +102,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>