public class QueryHelper extends Object
| 构造器和说明 |
|---|
QueryHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Query |
createQuery(InputStream inputStream,
Charset charset,
Finder finder)
创建查询实例
|
static Query |
createQuery(InputStream queryInput,
Finder finder)
创建查询实例
|
static Query |
createQuery(QIL qil,
Finder finder)
创建查询实例
|
static Query |
createQuery(QueryModel queryModel,
CompilerArguments compilerArguments,
Finder finder)
创建查询实例
|
static Query |
createQuery(Reader queryReader,
Finder finder)
创建查询实例
|
static Query |
createQuery(String queryString,
Finder finder)
创建查询实例
|
static QIL |
queryCompiler(InputStream queryInput,
Charset charset,
Finder importFinder)
解析并编译 DataQL 执行脚本
|
static QIL |
queryCompiler(InputStream queryInput,
Finder importFinder)
解析并编译 DataQL 执行脚本
|
static QIL |
queryCompiler(QueryModel queryModel,
CompilerArguments compilerArguments,
Finder importFinder)
编译已经解析好的 DataQL
|
static QIL |
queryCompiler(Reader queryReader,
Finder importFinder)
解析并编译 DataQL 执行脚本
|
static QIL |
queryCompiler(String queryString,
Finder importFinder)
解析并编译 DataQL 执行脚本
|
static QueryModel |
queryParser(org.antlr.v4.runtime.CharStream charStream) |
static QueryModel |
queryParser(InputStream queryInput)
解析 DataQL 执行脚本
|
static QueryModel |
queryParser(InputStream inputStream,
Charset charset)
解析 DataQL 执行脚本
|
static QueryModel |
queryParser(Reader queryReader)
解析 DataQL 执行脚本
|
static QueryModel |
queryParser(String queryString)
解析 DataQL 执行脚本
|
public static QueryModel queryParser(String queryString) throws IOException
queryString - 脚本字符串IOExceptionpublic static QueryModel queryParser(Reader queryReader) throws IOException
queryReader - 脚本输入流IOExceptionpublic static QueryModel queryParser(InputStream queryInput) throws IOException
queryInput - 脚本输入流,使用 UTF-8 字符集IOExceptionpublic static QueryModel queryParser(InputStream inputStream, Charset charset) throws IOException
inputStream - 脚本输入流charset - 读取字节流使用的字符集IOExceptionpublic static QueryModel queryParser(org.antlr.v4.runtime.CharStream charStream) throws ParseException
ParseExceptionpublic static QIL queryCompiler(String queryString, Finder importFinder) throws IOException
queryString - 脚本字符串importFinder - import 导入用到的资源加载器。IOExceptionpublic static QIL queryCompiler(Reader queryReader, Finder importFinder) throws IOException
queryReader - 脚本输入流importFinder - import 导入用到的资源加载器。IOExceptionpublic static QIL queryCompiler(InputStream queryInput, Finder importFinder) throws IOException
queryInput - 脚本输入流,使用 UTF-8 字符集importFinder - import 导入用到的资源加载器。IOExceptionpublic static QIL queryCompiler(InputStream queryInput, Charset charset, Finder importFinder) throws IOException
queryInput - 脚本输入流charset - 读取字节流使用的字符集importFinder - import 导入用到的资源加载器。IOExceptionpublic static QIL queryCompiler(QueryModel queryModel, CompilerArguments compilerArguments, Finder importFinder) throws IOException
queryModel - 解析之后的 DataQL 查询模型。compilerArguments - 编译参数,编译参数中包含了编译器需要的一些列变量。例如:编译变量,相当于在脚本中预先 执行 var xxx = null;
其意义在于在编译期就把脚本中尚未定义过的变量预先进行声明从而免去通过 ${...} 或类似方式查找变量。importFinder - import 导入用到的资源加载器。IOExceptionpublic static Query createQuery(String queryString, Finder finder) throws IOException
IOExceptionpublic static Query createQuery(Reader queryReader, Finder finder) throws IOException
IOExceptionpublic static Query createQuery(InputStream queryInput, Finder finder) throws IOException
IOExceptionpublic static Query createQuery(InputStream inputStream, Charset charset, Finder finder) throws IOException
IOExceptionpublic static Query createQuery(QueryModel queryModel, CompilerArguments compilerArguments, Finder finder) throws IOException
IOExceptionCopyright © 2020. All rights reserved.