Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class QueryParser {

private static Pattern parameterNamePattern = Pattern.compile("([\\d\\w_]+):([\\d\\w_\\/]+)");
private static Pattern parameterNamePattern = Pattern.compile("([\\d\\w_]+):([\\d\\w_\\/]+)(?:>|<|<=|>=|~=|\\|=)?");
private static Matcher parameterNameMatcher = parameterNamePattern.matcher("");

public Query parse(String name, String queryString) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class AbstractResultSet implements ResultSet {
protected int currentResult;
protected Object cursor;
protected int numPages;
protected boolean fetchedFirstPage = false;
protected boolean fetchedFirstPage;

public AbstractResultSet(Query query, ReadService readService) {
this.readService = readService;
Expand All @@ -36,6 +36,7 @@ public Result current() {
}

public void reset() {
fetchedFirstPage = false;
currentResult = -1;
cursor = true;
}
Expand All @@ -52,8 +53,8 @@ public boolean isEmpty() {
}

public Result next() throws FreebaseServiceException {
currentResult++;
if (currentResult >= results.size() &&
++currentResult;
if (currentResult >= (results.size() - 1) &&
((cursor instanceof Boolean && (Boolean)cursor == true) || (cursor instanceof String)))
{
fetchNextPage();
Expand Down