Search in sources :

Example 1 with TableBuilder

use of io.confluent.ksql.cli.console.table.builder.TableBuilder in project ksql by confluentinc.

the class Console method printSchema.

private void printSchema(final Optional<WindowType> windowType, final List<FieldInfo> fields, final boolean isTable) {
    final Table.Builder tableBuilder = new Table.Builder();
    if (!fields.isEmpty()) {
        tableBuilder.withColumnHeaders("Field", "Type");
        fields.forEach(f -> tableBuilder.withRow(f.getName(), formatFieldType(f, windowType, isTable)));
        tableBuilder.build().print(this);
    }
}
Also used : Builder(io.confluent.ksql.cli.console.table.Table.Builder) Table(io.confluent.ksql.cli.console.table.Table) Builder(io.confluent.ksql.cli.console.table.Table.Builder) PropertiesListTableBuilder(io.confluent.ksql.cli.console.table.builder.PropertiesListTableBuilder) TablesListTableBuilder(io.confluent.ksql.cli.console.table.builder.TablesListTableBuilder) TableBuilder(io.confluent.ksql.cli.console.table.builder.TableBuilder) ListVariablesTableBuilder(io.confluent.ksql.cli.console.table.builder.ListVariablesTableBuilder) TerminateQueryTableBuilder(io.confluent.ksql.cli.console.table.builder.TerminateQueryTableBuilder) TopicDescriptionTableBuilder(io.confluent.ksql.cli.console.table.builder.TopicDescriptionTableBuilder) DropConnectorTableBuilder(io.confluent.ksql.cli.console.table.builder.DropConnectorTableBuilder) TypeListTableBuilder(io.confluent.ksql.cli.console.table.builder.TypeListTableBuilder) WarningEntityTableBuilder(io.confluent.ksql.cli.console.table.builder.WarningEntityTableBuilder) CommandStatusTableBuilder(io.confluent.ksql.cli.console.table.builder.CommandStatusTableBuilder) StreamsListTableBuilder(io.confluent.ksql.cli.console.table.builder.StreamsListTableBuilder) QueriesTableBuilder(io.confluent.ksql.cli.console.table.builder.QueriesTableBuilder) ErrorEntityTableBuilder(io.confluent.ksql.cli.console.table.builder.ErrorEntityTableBuilder) ConnectorInfoTableBuilder(io.confluent.ksql.cli.console.table.builder.ConnectorInfoTableBuilder) ExecutionPlanTableBuilder(io.confluent.ksql.cli.console.table.builder.ExecutionPlanTableBuilder) ConnectorPluginsListTableBuilder(io.confluent.ksql.cli.console.table.builder.ConnectorPluginsListTableBuilder) KafkaTopicsListTableBuilder(io.confluent.ksql.cli.console.table.builder.KafkaTopicsListTableBuilder) ConnectorListTableBuilder(io.confluent.ksql.cli.console.table.builder.ConnectorListTableBuilder) FunctionNameListTableBuilder(io.confluent.ksql.cli.console.table.builder.FunctionNameListTableBuilder)

Aggregations

Table (io.confluent.ksql.cli.console.table.Table)1 Builder (io.confluent.ksql.cli.console.table.Table.Builder)1 CommandStatusTableBuilder (io.confluent.ksql.cli.console.table.builder.CommandStatusTableBuilder)1 ConnectorInfoTableBuilder (io.confluent.ksql.cli.console.table.builder.ConnectorInfoTableBuilder)1 ConnectorListTableBuilder (io.confluent.ksql.cli.console.table.builder.ConnectorListTableBuilder)1 ConnectorPluginsListTableBuilder (io.confluent.ksql.cli.console.table.builder.ConnectorPluginsListTableBuilder)1 DropConnectorTableBuilder (io.confluent.ksql.cli.console.table.builder.DropConnectorTableBuilder)1 ErrorEntityTableBuilder (io.confluent.ksql.cli.console.table.builder.ErrorEntityTableBuilder)1 ExecutionPlanTableBuilder (io.confluent.ksql.cli.console.table.builder.ExecutionPlanTableBuilder)1 FunctionNameListTableBuilder (io.confluent.ksql.cli.console.table.builder.FunctionNameListTableBuilder)1 KafkaTopicsListTableBuilder (io.confluent.ksql.cli.console.table.builder.KafkaTopicsListTableBuilder)1 ListVariablesTableBuilder (io.confluent.ksql.cli.console.table.builder.ListVariablesTableBuilder)1 PropertiesListTableBuilder (io.confluent.ksql.cli.console.table.builder.PropertiesListTableBuilder)1 QueriesTableBuilder (io.confluent.ksql.cli.console.table.builder.QueriesTableBuilder)1 StreamsListTableBuilder (io.confluent.ksql.cli.console.table.builder.StreamsListTableBuilder)1 TableBuilder (io.confluent.ksql.cli.console.table.builder.TableBuilder)1 TablesListTableBuilder (io.confluent.ksql.cli.console.table.builder.TablesListTableBuilder)1 TerminateQueryTableBuilder (io.confluent.ksql.cli.console.table.builder.TerminateQueryTableBuilder)1 TopicDescriptionTableBuilder (io.confluent.ksql.cli.console.table.builder.TopicDescriptionTableBuilder)1 TypeListTableBuilder (io.confluent.ksql.cli.console.table.builder.TypeListTableBuilder)1