提交 79ea94ee authored 作者: Thomas Mueller's avatar Thomas Mueller

Merge pull request #194 from svladykin/prepare

minor refactoring of IndexCursor
......@@ -68,12 +68,12 @@ public class IndexCursor implements Cursor {
}
/**
* Re-evaluate the start and end values of the index search for rows.
* Prepare this index cursor to make a lookup in index.
*
* @param s the session
* @param indexConditions the index conditions
* @param s Session.
* @param indexConditions Index conditions.
*/
public void find(Session s, ArrayList<IndexCondition> indexConditions) {
public void prepare(Session s, ArrayList<IndexCondition> indexConditions) {
this.session = s;
alwaysFalse = false;
start = end = null;
......@@ -148,6 +148,16 @@ public class IndexCursor implements Cursor {
}
}
}
}
/**
* Re-evaluate the start and end values of the index search for rows.
*
* @param s the session
* @param indexConditions the index conditions
*/
public void find(Session s, ArrayList<IndexCondition> indexConditions) {
prepare(s, indexConditions);
if (inColumn != null) {
return;
}
......@@ -252,6 +262,24 @@ public class IndexCursor implements Cursor {
return alwaysFalse;
}
/**
* Get start search row.
*
* @return search row
*/
public SearchRow getStart() {
return start;
}
/**
* Get end search row.
*
* @return search row
*/
public SearchRow getEnd() {
return end;
}
@Override
public Row get() {
if (cursor == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论