提交 35ba0b0d 编写于 作者: T terrymanu

update javadoc

上级 a087ef84
......@@ -44,7 +44,7 @@ public final class SQLJudgeEngine {
/**
* 判断并获取SQL类型.
*
* @return SQL解析上下文
* @return SQL语句对象
*/
public SQLStatement judge() {
Lexer lexer = new Lexer(sql, new Dictionary());
......
......@@ -51,7 +51,7 @@ public final class SQLParsingEngine {
/**
* 解析SQL.
*
* @return SQL解析上下文
* @return SQL语句对象
*/
public SQLStatement parse() {
SQLParser sqlParser = getSQLParser();
......
......@@ -27,7 +27,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* 聚合Select Item上下文.
* 聚合选择项.
*
* @author zhangliang
*/
......
......@@ -22,7 +22,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Select Item上下文.
* 选择项.
*
* @author zhangliang
*/
......
......@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* 自动生成键上下文.
* 自动生成键.
*
* @author zhangliang
*/
......
......@@ -25,7 +25,7 @@ import lombok.Setter;
import lombok.ToString;
/**
* 分组上下文.
* 分组对象.
*
* @author zhangliang
*/
......
......@@ -25,7 +25,7 @@ import lombok.Setter;
import java.util.List;
/**
* 分页上下文.
* 分页对象.
*
* @author zhangliang
*/
......
......@@ -25,7 +25,7 @@ import lombok.Setter;
import lombok.ToString;
/**
* 排序上下文.
* 排序对象.
*
* @author zhangliang
*/
......
......@@ -20,7 +20,7 @@ package com.dangdang.ddframe.rdb.sharding.parsing.parser.context;
import com.google.common.base.Optional;
/**
* Select Item上下文接口.
* 选择项接口.
*
* @author zhangliang
*/
......
......@@ -23,7 +23,7 @@ import lombok.RequiredArgsConstructor;
import lombok.ToString;
/**
* 表上下文.
* 表对象.
*
* @author zhangliang
*/
......
......@@ -42,11 +42,11 @@ public final class MySQLParser extends SQLParser {
}
/**
* 解析分页.
* 解析分页.
*
* @param sqlStatement SQL语句对象
* @param parametersIndex 参数索引
* @return 分页上下文
* @return 分页
*/
public Limit parseLimit(final SQLStatement sqlStatement, final int parametersIndex) {
skipIfEqual(MySQLKeyword.LIMIT);
......
......@@ -77,37 +77,37 @@ public interface SQLStatement {
Optional<Column> findColumn(SQLExpression sqlExpression);
/**
* 获取排序上下文集合.
* 获取排序集合.
*
* @return 排序上下文集合
* @return 排序集合
*/
List<OrderBy> getOrderByList();
/**
* 获取分组上下文集合.
* 获取分组集合.
*
* @return 分组上下文集合
* @return 分组集合
*/
List<GroupBy> getGroupByList();
/**
* 获取聚合上下文集合.
* 获取聚合选择项集合.
*
* @return 聚合上下文集合
* @return 聚合选择项
*/
List<AggregationSelectItem> getAggregationSelectItems();
/**
* 获取分页上下文.
* 获取分页.
*
* @return 分页上下文
* @return 分页
*/
Limit getLimit();
/**
* 设置分页上下文.
* 设置分页.
*
* @param limit 分页上下文
* @param limit 分页
*/
void setLimit(Limit limit);
......
......@@ -56,9 +56,6 @@ import java.util.List;
public abstract class AbstractBaseParseTest {
@Getter(AccessLevel.PROTECTED)
private final String testCaseName;
@Getter(AccessLevel.PROTECTED)
private final String sql;
......@@ -78,7 +75,6 @@ public abstract class AbstractBaseParseTest {
protected AbstractBaseParseTest(final String testCaseName, final String sql, final String expectedSQL,
final Collection<Table> expectedTables, final Collection<Condition> expectedConditions, final SQLStatement expectedSQLStatement) {
this.testCaseName = testCaseName;
this.sql = sql;
this.expectedSQL = expectedSQL;
this.expectedTables = expectedTables.iterator();
......
<?xml version="1.0" encoding="UTF-8"?>
<asserts>
<assert id="assertSelectForLimitWithRowCountOnlyWithParameter" sql="SELECT * FROM order o LIMIT ?" expected-sql="SELECT * FROM [Token(order)] o LIMIT ?">
<assert id="assertSelectForLimitWithRowCountOnlyWithParameter" sql="SELECT * FROM order o LIMIT ?" expected-sql="SELECT * FROM [Token(order)] o LIMIT ?">
<tables>
<table name="order" alias="o" />
</tables>
......
<?xml version="1.0" encoding="UTF-8"?>
<asserts>
<assert id="assertSelectForLimitWithRowCountOnlyWithParameter" sql="SELECT * FROM order o LIMIT ?, ?" expected-sql="SELECT * FROM [Token(order)] o LIMIT ?, ?">
<assert id="assertSelectForLimitWithRowCountOnlyWithParameter" sql="SELECT * FROM order o LIMIT ?, ?" expected-sql="SELECT * FROM [Token(order)] o LIMIT ?, ?">
<tables>
<table name="order" alias="o" />
</tables>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册