Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. case 3:
  2. // delete from
  3.  
  4. matcher = Pattern.compile("(?i)\\s*DELETE\\s+FROM\\s*(\\w+)\\s*where\\s*(\\w+)\\s*(=|<|>)\\s*(\\w+)\\s*;").matcher(query);
  5. if (matcher.find()) {
  6. name = matcher.group(1);
  7. String op = matcher.group(3);
  8. String LHS = matcher.group(2);
  9. String RHS = matcher.group(4);
  10.  
  11. //Delete (String tableName ,char operator, String col, String val )
  12. char[] operand = op.toCharArray();
  13. System.out.print( name + " " +LHS + " "+op + " " + RHS );
  14. Controller.controller().Delete(name, operand[0], LHS, RHS);
  15.  
  16. }
  17.  
  18.  
  19. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement