org.ssssssss.magicapi.modules.BoundSql Maven / Gradle / Ivy
package org.ssssssss.magicapi.modules;
import org.ssssssss.magicapi.cache.SqlCache;
import org.ssssssss.magicapi.context.RequestContext;
import org.ssssssss.magicapi.interceptor.SQLInterceptor;
import org.ssssssss.script.MagicScriptContext;
import org.ssssssss.script.functions.StreamExtension;
import org.ssssssss.script.parsing.GenericTokenParser;
import org.ssssssss.script.parsing.ast.literal.BooleanLiteral;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class BoundSql {
private static final GenericTokenParser concatTokenParser = new GenericTokenParser("${", "}", false);
private static final GenericTokenParser replaceTokenParser = new GenericTokenParser("#{", "}", true);
private static final GenericTokenParser ifTokenParser = new GenericTokenParser("?{", "}", true);
private static final GenericTokenParser ifParamTokenParser = new GenericTokenParser("?{", ",", true);
private static final Pattern REPLACE_MULTI_WHITE_LINE = Pattern.compile("(\r?\n(\\s*\r?\n)+)");
private String sql;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy