dbi.inTransaction(new VoidTransactionCallback()
{
@Override
protected void execute(Handle dbiHandle, TransactionStatus status)
{
MetadataDao dao = dbiHandle.attach(MetadataDao.class);
long tableId = dao.insertTable(connectorId, table.getSchemaName(), table.getTableName());
for (int i = 0; i < table.getColumnTypes().size(); i++) {
RaptorColumnHandle column = table.getColumnHandles().get(i);
Type columnType = table.getColumnTypes().get(i);
dao.insertColumn(tableId, i + 1, column.getColumnName(), i, columnType.getName());
}
}
});
ImmutableMap.Builder<UUID, String> shards = ImmutableMap.builder();