This commit is contained in:
坏黑 2019-10-31 00:51:58 +08:00
parent 25011a7a57
commit 1e55b6be29
2 changed files with 5 additions and 1 deletions

View File

@ -38,6 +38,10 @@ public class QueryUpdate {
return this; return this;
} }
public void run(DataSource dataSource) {
this.to(dataSource).run();
}
public RunnableUpdate to(DataSource dataSource) { public RunnableUpdate to(DataSource dataSource) {
return new RunnableUpdate(toQuery()).dataSource(dataSource).statement(s -> { return new RunnableUpdate(toQuery()).dataSource(dataSource).statement(s -> {
int index = 1; int index = 1;

View File

@ -56,7 +56,7 @@ public class TMap {
} }
public static TMap parse(String in) { public static TMap parse(String in) {
Matcher matcher = Pattern.compile("(?<name>[^{}]+)?\\{(?<content>[^<>]+)}").matcher(in.replaceAll("[\r\n]", "")); Matcher matcher = Pattern.compile("(?<name>.+)?\\{(?<content>.+)}").matcher(in.replaceAll("[\r\n]", ""));
if (matcher.find()) { if (matcher.find()) {
TMap map = new TMap(matcher.group("name")); TMap map = new TMap(matcher.group("name"));
for (String content : matcher.group("content").split(";")) { for (String content : matcher.group("content").split(";")) {