MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / getOp

Method getOp

src/java/simpledb/Parser.java:28–49  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

26 static boolean explain = false;
27
28 public static Predicate.Op getOp(String s) throws simpledb.ParsingException {
29 if (s.equals("="))
30 return Predicate.Op.EQUALS;
31 if (s.equals(">"))
32 return Predicate.Op.GREATER_THAN;
33 if (s.equals(">="))
34 return Predicate.Op.GREATER_THAN_OR_EQ;
35 if (s.equals("<"))
36 return Predicate.Op.LESS_THAN;
37 if (s.equals("<="))
38 return Predicate.Op.LESS_THAN_OR_EQ;
39 if (s.equals("LIKE"))
40 return Predicate.Op.LIKE;
41 if (s.equals("~"))
42 return Predicate.Op.LIKE;
43 if (s.equals("<>"))
44 return Predicate.Op.NOT_EQUALS;
45 if (s.equals("!="))
46 return Predicate.Op.NOT_EQUALS;
47
48 throw new simpledb.ParsingException("Unknown predicate " + s);
49 }
50
51 void processExpression(TransactionId tid, ZExpression wx, LogicalPlan lp)
52 throws simpledb.ParsingException, IOException, ParseException {

Callers 1

processExpressionMethod · 0.95

Calls 1

equalsMethod · 0.65

Tested by

no test coverage detected