Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git

Removed unused class.

Author Dave Jarvis <email>
Date 2015-03-16 19:14:03 GMT-0700
Commit 42309d5ad5b893c26c4d6bd9fbef2101bad470b9
Parent 390c452
Delta 4 lines added, 47 lines removed, 43-line decrease
source/java/com/whitemagicsoftware/rxm/tree/xml/WhereClause.java
if( literal == null ) {
+ // No literal value to examine means it is probably a parameter.
result = ctx.getText();
}
else {
// Default is to presume the value literal is not the 'null' token.
String rhs = literal.getText();
// If the "null" literal terminal node is not null, then null has
- // been found and so the value must be switched to NULL and the
- // comparators likewise revised.
+ // been found and so the value must be set to NULL and the
+ // comparators changed from symbols to ANSI SQL keywords.
if( literal.T_NULL() != null ) {
rhs = "NULL";
comparator = " IS " + (equal == null ? "NOT " : "");
}
result = String.format( "%s%s%s", entity, comparator, rhs );
}
}
else {
+ // Transform to ANSI SQL set notation.
result = String.format( "%s %sIN (%s)",
entity,
source/java/com/whitemagicsoftware/rxm/tree/xml/WhereContext.java
-package com.whitemagicsoftware.rxm.tree.xml;
-
-import com.whitemagicsoftware.rxm.grammar.QueryParser;
-import com.whitemagicsoftware.rxm.tree.Payload;
-import com.whitemagicsoftware.rxm.tree.Token;
-import com.whitemagicsoftware.rxm.tree.Tree;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-
-/**
- * Transforms a where <b>rxm</b> expression into a SQL <code>WHERE</code>
- * expression.
- */
-public class WhereContext extends PayloadParserRuleContext {
- /**
- * Default constructor (calls super).
- *
- * @param ctx The payload that associates the parser rule context with
- * the abstract syntax tree.
- */
- public WhereContext( Payload ctx ) {
- super( ctx );
- }
-
- /**
- * Returns the starting text for an OUTER JOIN clause.
- */
- @Override
- public Token getStart() {
- return new Token( "" );
- }
-
- /**
- * Returns the ending text for an OUTER JOIN clause.
- */
- @Override
- public Token getStop() {
- return new Token( "" );
- }
-
- private QueryParser.ExpressionContext expression() {
- return ((QueryParser.WhereContext)getParserRuleContext()).expression();
- }
-}
-