Skip to content

Commit

Permalink
0001913: DbFill now has the capability to print the sql to the comman…
Browse files Browse the repository at this point in the history
…d line and to the Sql Editor.
  • Loading branch information
chenson42 committed Aug 20, 2014
1 parent 65cdef0 commit 3dd341f
Showing 1 changed file with 2 additions and 8 deletions.
Expand Up @@ -621,7 +621,7 @@ protected Table getDbTable(String tableName) {
public DmlStatement createInsertDmlStatement(Table table) {
return platform.createDmlStatement(DmlType.INSERT,
table.getCatalog(), table.getSchema(), table.getName(),
table.getPrimaryKeyColumns(), table.getNonPrimaryKeyColumns(),
table.getPrimaryKeyColumns(), table.getColumns(),
null);
}

Expand All @@ -640,14 +640,8 @@ public DmlStatement createDeleteDmlStatement(Table table) {
}

private Row createRandomInsertValues(DmlStatement updStatement, Table table) {
Row row = selectRandomRow(table);
if (row == null) {
log.warn("Unable to update a random record in empty table '"
+ table.getName() + "'.");
return null;
}
Column[] columns = updStatement.getMetaData();
Row row = new Row(columns.length);
for (int i = 0; i < columns.length; i++) {
row.put(columns[i].getName(), generateRandomValueForColumn(columns[i]));
}
Expand Down

0 comments on commit 3dd341f

Please sign in to comment.