From 4de7dff0ad6ab8f419d5e25dc4e61fe744549c70 Mon Sep 17 00:00:00 2001
From: szumielxd <43210079+szumielxd@users.noreply.github.com>
Date: Wed, 17 Jul 2024 20:26:07 +0200
Subject: [PATCH 1/3] Added missing Skript repository
---
pom.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pom.xml b/pom.xml
index 78da008..eb6276e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,10 @@
sk89q
https://maven.sk89q.com/repo
+
+ skript
+ https://repo.skriptlang.org/releases
+
--
2.47.0
From 52d111dbfa1c8b3bcbeb2e6b23097acd5b3dedbb Mon Sep 17 00:00:00 2001
From: szumielxd <43210079+szumielxd@users.noreply.github.com>
Date: Wed, 17 Jul 2024 20:36:23 +0200
Subject: [PATCH 2/3] Ignore Eclipse internal files
---
.gitignore | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/.gitignore b/.gitignore
index a942888..25d3b8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,19 @@
out/
target
compile/
+
+# eclipse specific git ignore
+*.pydevproject
+.project
+.metadata
+bin/**
+tmp/**
+tmp/**/*
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
--
2.47.0
From 110f3982adc8ae5eec73e1415763862040dab1e6 Mon Sep 17 00:00:00 2001
From: szumielxd <43210079+szumielxd@users.noreply.github.com>
Date: Thu, 18 Jul 2024 00:45:02 +0200
Subject: [PATCH 3/3] Added option to provide PreparedStatement-like query
argument binding
---
.../skriptdb/skript/EffExecuteStatement.java | 228 +++++++++---------
1 file changed, 120 insertions(+), 108 deletions(-)
diff --git a/src/main/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java b/src/main/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java
index 6a74670..9a935b2 100644
--- a/src/main/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java
+++ b/src/main/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java
@@ -25,6 +25,7 @@ import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.regex.Pattern;
/**
* Executes a statement on a database and optionally stores the result in a variable. Expressions
@@ -45,17 +46,20 @@ import java.util.concurrent.Executors;
*/
public class EffExecuteStatement extends Effect {
private static final ExecutorService threadPool = Executors.newFixedThreadPool(SkriptDB.getInstance().getConfig().getInt("thread-pool-size", 10));
+ private static final Pattern ARGUMENT_PLACEHOLDER = Pattern.compile("(? query;
private Expression dataSource;
+ private Expression