From aedd8f6a2b55ce8138300f6290fa0f5263923ec5 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Wed, 3 Aug 2022 19:48:03 +0800 Subject: [PATCH 1/4] avoid deploy package conflict --- api/pom.xml | 2 +- demo/pom.xml | 2 +- impl/pom.xml | 2 +- pom.xml | 67 ++------------------------------------ with-pool/beecp/pom.xml | 2 +- with-pool/hikaricp/pom.xml | 2 +- 6 files changed, 7 insertions(+), 70 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index ac3edcd1..3901d657 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - cc.carm.lib + com.ghostchu.fork.cc.carm.lib easysql-parent 0.4.3 diff --git a/demo/pom.xml b/demo/pom.xml index 0883478d..2b667854 100644 --- a/demo/pom.xml +++ b/demo/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> easysql-parent - cc.carm.lib + com.ghostchu.fork.cc.carm.lib 0.4.3 4.0.0 diff --git a/impl/pom.xml b/impl/pom.xml index 5a847132..29772f31 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> easysql-parent - cc.carm.lib + com.ghostchu.fork.cc.carm.lib 0.4.3 4.0.0 diff --git a/pom.xml b/pom.xml index 7056978d..9cb258da 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ https://sonarcloud.io - cc.carm.lib + com.ghostchu.fork.cc.carm.lib easysql-parent pom 0.4.3 @@ -130,26 +130,6 @@ org.apache.maven.plugins maven-surefire-plugin - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - --pinentry-mode - loopback - - - org.apache.maven.plugins maven-release-plugin @@ -180,7 +160,7 @@ true - cc.carm.lib:* + com.ghostchu.fork.cc.carm.lib:* @@ -274,48 +254,5 @@ - - - - ossrh - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - github - - - github - GitHub Packages - https://maven.pkg.github.com/CarmJos/EasySQL - - - - - - local - - - localRepository - file:${user.home}/local-deploy/ - - - localRepository - file:${user.home}/local-deploy/ - - - - - diff --git a/with-pool/beecp/pom.xml b/with-pool/beecp/pom.xml index dfe001bb..07441707 100644 --- a/with-pool/beecp/pom.xml +++ b/with-pool/beecp/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> easysql-parent - cc.carm.lib + com.ghostchu.fork.cc.carm.lib 0.4.3 ../../pom.xml diff --git a/with-pool/hikaricp/pom.xml b/with-pool/hikaricp/pom.xml index fc750967..686e4fe0 100644 --- a/with-pool/hikaricp/pom.xml +++ b/with-pool/hikaricp/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> easysql-parent - cc.carm.lib + com.ghostchu.fork.cc.carm.lib 0.4.3 ../../pom.xml From 373b1bce2658b136cbf6f26625d247947b012550 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Thu, 4 Aug 2022 16:29:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=85=81=E8=AE=B8=E5=8F=96?= =?UTF-8?q?=E5=BE=97=20async=20=E8=AE=A1=E5=88=92=E7=9A=84=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/src/main/java/cc/carm/lib/easysql/api/SQLManager.java | 7 +++++++ .../java/cc/carm/lib/easysql/action/AbstractSQLAction.java | 3 +++ .../java/cc/carm/lib/easysql/manager/SQLManagerImpl.java | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/api/src/main/java/cc/carm/lib/easysql/api/SQLManager.java b/api/src/main/java/cc/carm/lib/easysql/api/SQLManager.java index fa3a9782..914c9032 100644 --- a/api/src/main/java/cc/carm/lib/easysql/api/SQLManager.java +++ b/api/src/main/java/cc/carm/lib/easysql/api/SQLManager.java @@ -103,6 +103,13 @@ default void setDebugMode(boolean enable) { */ @NotNull Map getActiveQuery(); + /** + * 得到计划的查询。 + * + * @return 已计划的查询 + */ + @NotNull Map> getPendingQuery(); + /** * 获取改管理器提供的默认异常处理器。 * 若未使用过 {@link #setExceptionHandler(SQLExceptionHandler)} 方法, diff --git a/impl/src/main/java/cc/carm/lib/easysql/action/AbstractSQLAction.java b/impl/src/main/java/cc/carm/lib/easysql/action/AbstractSQLAction.java index aa32f9b4..4f87f7aa 100644 --- a/impl/src/main/java/cc/carm/lib/easysql/action/AbstractSQLAction.java +++ b/impl/src/main/java/cc/carm/lib/easysql/action/AbstractSQLAction.java @@ -81,11 +81,14 @@ protected void debugMessage(List params) { @Override @SuppressWarnings("FutureReturnValueIgnored") public void executeAsync(SQLHandler success, SQLExceptionHandler failure) { + getManager().getPendingQuery().put(getActionUUID(),this); getManager().getExecutorPool().submit(() -> { try { T returnedValue = execute(); + getManager().getPendingQuery().remove(getActionUUID()); if (success != null) success.accept(returnedValue); } catch (SQLException e) { + getManager().getPendingQuery().remove(getActionUUID()); handleException(failure, e); } }); diff --git a/impl/src/main/java/cc/carm/lib/easysql/manager/SQLManagerImpl.java b/impl/src/main/java/cc/carm/lib/easysql/manager/SQLManagerImpl.java index 22f9f675..efbcb83b 100644 --- a/impl/src/main/java/cc/carm/lib/easysql/manager/SQLManagerImpl.java +++ b/impl/src/main/java/cc/carm/lib/easysql/manager/SQLManagerImpl.java @@ -4,6 +4,7 @@ import cc.carm.lib.easysql.action.PreparedSQLUpdateActionImpl; import cc.carm.lib.easysql.action.SQLUpdateActionImpl; import cc.carm.lib.easysql.action.SQLUpdateBatchActionImpl; +import cc.carm.lib.easysql.api.SQLAction; import cc.carm.lib.easysql.api.SQLManager; import cc.carm.lib.easysql.api.SQLQuery; import cc.carm.lib.easysql.api.action.PreparedSQLUpdateAction; @@ -32,6 +33,7 @@ public class SQLManagerImpl implements SQLManager { private final Logger LOGGER; private final DataSource dataSource; private final ConcurrentHashMap activeQuery = new ConcurrentHashMap<>(); + private final ConcurrentHashMap> pendingQuery = new ConcurrentHashMap<>(); protected ExecutorService executorPool; @NotNull Supplier debugMode = () -> Boolean.FALSE; @@ -112,6 +114,11 @@ public void setExecutorPool(@NotNull ExecutorService executorPool) { return this.activeQuery; } + @Override + public @NotNull Map> getPendingQuery() { + return this.pendingQuery; + } + @Override public @NotNull SQLExceptionHandler getExceptionHandler() { return this.exceptionHandler; From 44ac81cf501354f066c00c2d84f9564e8100fef3 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Thu, 4 Aug 2022 16:35:03 +0800 Subject: [PATCH 3/4] feat: codemc deploy --- pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 9cb258da..c434ca77 100644 --- a/pom.xml +++ b/pom.xml @@ -96,12 +96,14 @@ - https://github.com/CarmJos/EasySQL/releases - - easysql-javadoc - EasySQL JavaDoc (on Github Pages) - https://CarmJos.github.io/EasySQL - + + codemc-releases + https://repo.codemc.io/repository/maven-releases/ + + + codemc-snapshots + https://repo.codemc.io/repository/maven-snapshots/ + @@ -253,6 +255,4 @@ - - From b2e64a314b5a55fd997268b8679ea84d2a3ec6db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:02:13 +0000 Subject: [PATCH 4/4] chore(deps): bump h2 from 2.1.214 to 2.2.220 in /demo 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] --- demo/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/pom.xml b/demo/pom.xml index 6f892fd9..95f46666 100644 --- a/demo/pom.xml +++ b/demo/pom.xml @@ -76,7 +76,7 @@ com.h2database h2 - 2.1.214 + 2.2.220