提交 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 { ...@@ -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 s Session.
* @param indexConditions the index conditions * @param indexConditions Index conditions.
*/ */
public void find(Session s, ArrayList<IndexCondition> indexConditions) { public void prepare(Session s, ArrayList<IndexCondition> indexConditions) {
this.session = s; this.session = s;
alwaysFalse = false; alwaysFalse = false;
start = end = null; start = end = null;
...@@ -148,6 +148,16 @@ public class IndexCursor implements Cursor { ...@@ -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) { if (inColumn != null) {
return; return;
} }
...@@ -252,6 +262,24 @@ public class IndexCursor implements Cursor { ...@@ -252,6 +262,24 @@ public class IndexCursor implements Cursor {
return alwaysFalse; 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 @Override
public Row get() { public Row get() {
if (cursor == null) { if (cursor == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论