From 3c70795dac733f8e4eae14353e713bda69df5ede Mon Sep 17 00:00:00 2001 From: Sanjula Ganepola <32170854+SanjulaGanepola@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:24:07 -0400 Subject: [PATCH] Make `Pool` constructor public and rename to `clCommand` (#53) * Make pool constructor public Signed-off-by: Sanjula Ganepola * Fix clCommand Signed-off-by: Sanjula Ganepola --------- Signed-off-by: Sanjula Ganepola --- src/main/java/io/github/mapepire_ibmi/Pool.java | 2 +- src/main/java/io/github/mapepire_ibmi/SqlJob.java | 2 +- src/test/java/io/github/mapepire_ibmi/CLTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/mapepire_ibmi/Pool.java b/src/main/java/io/github/mapepire_ibmi/Pool.java index 6975c0d..b3899eb 100644 --- a/src/main/java/io/github/mapepire_ibmi/Pool.java +++ b/src/main/java/io/github/mapepire_ibmi/Pool.java @@ -50,7 +50,7 @@ public class Pool { * * @param options The options for configuring the connection pool. */ - Pool(PoolOptions options) { + public Pool(PoolOptions options) { this.options = options; } diff --git a/src/main/java/io/github/mapepire_ibmi/SqlJob.java b/src/main/java/io/github/mapepire_ibmi/SqlJob.java index f98bba5..89c721c 100644 --- a/src/main/java/io/github/mapepire_ibmi/SqlJob.java +++ b/src/main/java/io/github/mapepire_ibmi/SqlJob.java @@ -682,7 +682,7 @@ public CompletableFuture setTraceConfig(ServerTraceDest dest, S * @param cmd The CL command. * @return A new Query instance for the command. */ - public Query clcommand(String cmd) { + public Query clCommand(String cmd) { QueryOptions options = new QueryOptions(); options.setIsClCommand(true); return new Query(this, cmd, options); diff --git a/src/test/java/io/github/mapepire_ibmi/CLTest.java b/src/test/java/io/github/mapepire_ibmi/CLTest.java index 5270840..51d3a09 100644 --- a/src/test/java/io/github/mapepire_ibmi/CLTest.java +++ b/src/test/java/io/github/mapepire_ibmi/CLTest.java @@ -15,7 +15,7 @@ void validCLCommand() throws Exception { SqlJob job = new SqlJob(); job.connect(MapepireTest.getCreds()).get(); - Query query = job.clcommand("WRKACTJOB"); + Query query = job.clCommand("WRKACTJOB"); QueryResult result = query.execute().get(); job.close(); @@ -28,7 +28,7 @@ void invalidCLCommand() throws Exception { SqlJob job = new SqlJob(); job.connect(MapepireTest.getCreds()).get(); - Query query = job.clcommand("INVALIDCOMMAND"); + Query query = job.clCommand("INVALIDCOMMAND"); QueryResult result = query.execute().get(); job.close();