Skip to content

Commit a110cd3

Browse files
authored
Extend examples and fix output table order (#382)
1 parent 5a05022 commit a110cd3

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

internal/cmd/beta/sqlserverflex/options/options.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ func NewCmd(p *print.Printer) *cobra.Command {
8282
Example: examples.Build(
8383
examples.NewExample(
8484
`List SQL Server Flex flavors options`,
85-
"$ stackit sqlserverflex options --flavors"),
85+
"$ stackit beta sqlserverflex options --flavors"),
8686
examples.NewExample(
8787
`List SQL Server Flex available versions`,
88-
"$ stackit sqlserverflex options --versions"),
88+
"$ stackit beta sqlserverflex options --versions"),
8989
examples.NewExample(
9090
`List SQL Server Flex storage options for a given flavor. The flavor ID can be retrieved by running "$ stackit sqlserverflex options --flavors"`,
91-
"$ stackit sqlserverflex options --storages --flavor-id <FLAVOR_ID>"),
91+
"$ stackit beta sqlserverflex options --storages --flavor-id <FLAVOR_ID>"),
92+
examples.NewExample(
93+
`List SQL Server Flex user roles and database compatibilities for a given instance. The IDs of existing instances can be obtained by running "$ stackit sqlserverflex instance list"`,
94+
"$ stackit beta sqlserverflex options --user-roles --db-compatibilities --instance-id <INSTANCE_ID>"),
9295
),
9396
RunE: func(cmd *cobra.Command, args []string) error {
9497
ctx := context.Background()
@@ -310,12 +313,13 @@ func outputResultAsTable(p *print.Printer, model *inputModel, options *options)
310313
if model.UserRoles {
311314
content += renderUserRoles(options.UserRoles)
312315
}
313-
if model.DBCollations {
314-
content += renderDBCollations(options.DBCollations)
315-
}
316316
if model.DBCompatibilities {
317317
content += renderDBCompatibilities(options.DBCompatibilities)
318318
}
319+
// Rendered at last because table is very long
320+
if model.DBCollations {
321+
content += renderDBCollations(options.DBCollations)
322+
}
319323

320324
err := p.PagerDisplay(content)
321325
if err != nil {

0 commit comments

Comments
 (0)