Skip to content

Commit

Permalink
[studio] Fix row column cursor in formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cchantep committed Feb 12, 2014
1 parent e54f09c commit 6a52641
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions studio/src/main/java/acolyte/RowFormatter.java
Expand Up @@ -223,7 +223,7 @@ static void appendNull(final Appender ap,
/** /**
* Result set values. * Result set values.
*/ */
static void appendValues(final Iterator<ResultRow> it, static void appendValues(final ResultRow rs,
final Appender ap, final Appender ap,
final Charset charset, final Charset charset,
final Formatting fmt, final Formatting fmt,
Expand All @@ -241,11 +241,10 @@ static void appendValues(final Iterator<ResultRow> it,
} // end of if } // end of if


final ColumnType col = cols.next(); final ColumnType col = cols.next();
final ResultRow rs = it.next();


if (rs.isNull(colIndex)) { if (rs.isNull(colIndex)) {
appendNull(ap, fmt, col); appendNull(ap, fmt, col);
appendValues(it, ap, charset, fmt, cols, colIndex+1); appendValues(rs, ap, charset, fmt, cols, colIndex+1);


return; return;
} // end of if } // end of if
Expand Down Expand Up @@ -316,7 +315,7 @@ static void appendValues(final Iterator<ResultRow> it,
break; break;
} // end of switch } // end of switch


appendValues(it, ap, charset, fmt, cols, colIndex+1); appendValues(rs, ap, charset, fmt, cols, colIndex+1);
} // end of appendValues } // end of appendValues


/** /**
Expand All @@ -336,7 +335,7 @@ protected static void appendRows(final Iterator<ResultRow> it,


ap.append(" "); ap.append(" ");
ap.append(fmt.rowStart); ap.append(fmt.rowStart);
appendValues(it, ap, charset, fmt, cols.iterator(), 0); appendValues(it.next(), ap, charset, fmt, cols.iterator(), 0);
ap.append(fmt.rowEnd); ap.append(fmt.rowEnd);
} // end of while } // end of while


Expand Down

0 comments on commit 6a52641

Please sign in to comment.