| Author | Dave Jarvis <email> |
|---|---|
| Date | 2015-03-16 10:17:20 GMT-0700 |
| Commit | 50e194b4120bbc871e79590a665534d6cc2517a8 |
| Parent | 2717de8 |
| #!/bin/bash | ||
| -java -jar build/libs/rxm.jar $1 | ||
| +java -Drxm_beautify=true -jar build/libs/rxm.jar $1 | ||
| +#java -jar build/libs/rxm.jar $1 | ||
| String join = getJoinClause(); | ||
| String where = getWhereClause(); | ||
| - System.out.printf( "%s%nFROM%n%s%n%s%n%s%n", | ||
| + System.out.printf( "%s%s%s%s", | ||
| select, from, join, where ); | ||
| } | ||
| */ | ||
| private String getFromClause() { | ||
| - return " person person"; | ||
| + return "FROM person person"; | ||
| } | ||
| */ | ||
| protected boolean beautify() { | ||
| - return true; | ||
| + return Boolean.getBoolean( "rxm_beautify" ); | ||
| } | ||
| public String toString() { | ||
| - return String.format( "SELECT%s%s", getWhitespace(0), super.toString() ); | ||
| + String w = getWhitespace(0); | ||
| + return String.format( "SELECT%s%s%s", w, super.toString(), w ); | ||
| } | ||
| public String toString() { | ||
| + String w = getWhitespace(0); | ||
| return getBranches().size() > 0 ? | ||
| - String.format( "WHERE%s%s", getWhitespace(), super.toString() ) : | ||
| + String.format( "%sWHERE%s%s", w, getWhitespace(), super.toString() ) : | ||
| ""; | ||
| } |
| Delta | 9 lines added, 6 lines removed, 3-line increase |
|---|