Permalink
Browse files

[studio] Fix row column cursor in formatting

  • Loading branch information...
cchantep
cchantep committed Feb 12, 2014
1 parent e54f09c commit 6a526416ca73ffee884ad1744f6c2f3376264781
Showing with 4 additions and 5 deletions.
  1. +4 −5 studio/src/main/java/acolyte/RowFormatter.java
@@ -223,7 +223,7 @@ static void appendNull(final Appender ap,
/**
* Result set values.
*/
static void appendValues(final Iterator<ResultRow> it,
static void appendValues(final ResultRow rs,
final Appender ap,
final Charset charset,
final Formatting fmt,
@@ -241,11 +241,10 @@ static void appendValues(final Iterator<ResultRow> it,
} // end of if
final ColumnType col = cols.next();
final ResultRow rs = it.next();
if (rs.isNull(colIndex)) {
appendNull(ap, fmt, col);
appendValues(it, ap, charset, fmt, cols, colIndex+1);
appendValues(rs, ap, charset, fmt, cols, colIndex+1);
return;
} // end of if
@@ -316,7 +315,7 @@ static void appendValues(final Iterator<ResultRow> it,
break;
} // end of switch
appendValues(it, ap, charset, fmt, cols, colIndex+1);
appendValues(rs, ap, charset, fmt, cols, colIndex+1);
} // end of appendValues
/**
@@ -336,7 +335,7 @@ protected static void appendRows(final Iterator<ResultRow> it,
ap.append(" ");
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);
} // end of while

0 comments on commit 6a52641

Please sign in to comment.