Hi everyone, I've introduced a new keyword 'UNTIL' clause in the traverse command that executes the traversal until the condition becomes true (opposite of while clause). the implementation is quite trivial, i've added a boolean flag 'negating' to OSQLFilter which if set, causes the result of the evaluation to be negated. other changes are in the parser to introduce the new keyword and minor refactoring into OWhileClause and OUntilClause instead of reusing OWhereClause. i'd appreciate any feedback on this contribution. thanks. if the code is acceptable then i'll create pull request.
you can view the diff over here: https://github.com/orientechnologies/orientdb/compare/develop...nagarajasr:develop?w=1 ---------------- the changes are: core/src/main/grammar/OrientSQL.jjt line 114, 618: introduce UNTIL keyword and line 825-833 and 2113-2128: refactor usage of OWhereClause into OWhileClause and OUntilClause core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLTraverse.java line 113-122: handle the new UNTIL keyword core/src/main/java/com/orientechnologies/orient/core/sql/filter/OSQLFilter.java line 121-130: introduce 'negating' flag line 34-39: new constructor to set the negating flag line 106-107: apply the negating flag when returning core/src/main/java/com/orientechnologies/orient/core/sql/parser/OTraverseStatement.java line 61-63 and 100-101: handle the until clause new files: core/src/main/java/com/orientechnologies/orient/core/sql/parser/OUntilClause.java core/src/main/java/com/orientechnologies/orient/core/sql/parser/OWhileClause.java core/src/main/java/com/orientechnologies/orient/core/sql/parser/OrientSql.java core/src/main/java/com/orientechnologies/orient/core/sql/parser/OrientSqlConstants.java core/src/main/java/com/orientechnologies/orient/core/sql/parser/OrientSqlTokenManager.java core/src/main/java/com/orientechnologies/orient/core/sql/parser/OrientSqlTreeConstants.java generated file, differences can be ignored -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
