| Author | Dave Jarvis <email> |
|---|---|
| Date | 2015-03-28 13:28:36 GMT-0700 |
| Commit | 6643430676b9c9a7c03b2e6286243ba0b549588f |
| Parent | f2a28d0 |
| # Overview | ||
| -Relational eXpression Map (**rxm**) is a database- and output-agnostic | ||
| +Relational eXpression Map (**rxm**) is a terse database- and output-agnostic | ||
| query language for generating structured documents. | ||
| /* Define table and path symbols. */ | ||
| -T_AT : '@' ; | ||
| -T_PERIOD: '.' ; | ||
| -T_SLASH : '/' ; | ||
| +T_ELLIPSES: '...' ; | ||
| +T_AT : '@' ; | ||
| +T_SLASH : '/' ; | ||
| +T_PERIOD : '.' ; | ||
| /* Define an identifier. */ | ||
| element : T_ID ; | ||
| elementPath : element (T_SLASH element)* ; | ||
| -path : element | elementPath; | ||
| +ellipsesPath: T_ELLIPSES T_SLASH elementPath ; | ||
| +path : element | elementPath | ellipsesPath; | ||
| /************************************************************************ | ||
| public int diverges( DivergentList<E> list ) { | ||
| int index = -1; | ||
| + | ||
| + // Used to determine the larger list for iterating. | ||
| boolean smaller = list.size() < this.size(); | ||
| Iterator<E> iFew = (smaller ? list : this).iterator(); | ||
| + // Iterate over the larger list. | ||
| for( E e : (smaller ? this : list) ) { | ||
| index++; | ||
| + // Terminate when the smaller list runs out of items. | ||
| if( !(iFew.hasNext() && e.equals( iFew.next() )) ) { | ||
| break; |
| +root > people, | ||
| +person > person, | ||
| +.first_name > name/first, | ||
| +.last_name > .../last, | ||
| +.middle_name > .../middle, | ||
| +address > address, | ||
| +address.person_id +> person.id, | ||
| +.id > @id, | ||
| +.city > city, | ||
| +.region > province, | ||
| +.code > postal, | ||
| +.street_line1 > street/line1, | ||
| +.street_line2 > .../line2, | ||
| +.street_line3 > .../line3, | ||
| + | ||
| Delta | 26 lines added, 5 lines removed, 21-line increase |
|---|