Skip to content

Commit 155ca32

Browse files
akoclaude
andcommitted
refactor: rename show* executor functions to list*
All internal executor handler functions previously named showXxx are now listXxx, consistent with the existing listDataTransformers convention and making the naming uniform across the package. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8766bd3 commit 155ca32

63 files changed

Lines changed: 290 additions & 290 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

mdl/executor/cmd_agenteditor_agents.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/mendixlabs/mxcli/sdk/agenteditor"
1717
)
1818

19-
// showAgentEditorAgents handles SHOW AGENTS [IN module].
20-
func showAgentEditorAgents(ctx *ExecContext, moduleName string) error {
19+
// listAgentEditorAgents handles SHOW AGENTS [IN module].
20+
func listAgentEditorAgents(ctx *ExecContext, moduleName string) error {
2121
if !ctx.Connected() {
2222
return mdlerrors.NewNotConnected()
2323
}

mdl/executor/cmd_agenteditor_kbs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/mendixlabs/mxcli/sdk/agenteditor"
1717
)
1818

19-
// showAgentEditorKnowledgeBases handles SHOW KNOWLEDGE BASES [IN module].
20-
func showAgentEditorKnowledgeBases(ctx *ExecContext, moduleName string) error {
19+
// listAgentEditorKnowledgeBases handles SHOW KNOWLEDGE BASES [IN module].
20+
func listAgentEditorKnowledgeBases(ctx *ExecContext, moduleName string) error {
2121
if !ctx.Connected() {
2222
return mdlerrors.NewNotConnected()
2323
}

mdl/executor/cmd_agenteditor_mcpservices.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/mendixlabs/mxcli/sdk/agenteditor"
1717
)
1818

19-
// showAgentEditorConsumedMCPServices handles SHOW CONSUMED MCP SERVICES [IN module].
20-
func showAgentEditorConsumedMCPServices(ctx *ExecContext, moduleName string) error {
19+
// listAgentEditorConsumedMCPServices handles SHOW CONSUMED MCP SERVICES [IN module].
20+
func listAgentEditorConsumedMCPServices(ctx *ExecContext, moduleName string) error {
2121
if !ctx.Connected() {
2222
return mdlerrors.NewNotConnected()
2323
}

mdl/executor/cmd_agenteditor_mock_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func TestShowAgentEditorModels_Mock(t *testing.T) {
307307
}
308308

309309
ctx, buf := newMockCtx(t, withBackend(mb), withHierarchy(h))
310-
assertNoError(t, showAgentEditorModels(ctx, ""))
310+
assertNoError(t, listAgentEditorModels(ctx, ""))
311311

312312
out := buf.String()
313313
assertContainsStr(t, out, "Qualified Name")
@@ -369,7 +369,7 @@ func TestShowAgentEditorAgents_Mock(t *testing.T) {
369369
}
370370

371371
ctx, buf := newMockCtx(t, withBackend(mb), withHierarchy(h))
372-
assertNoError(t, showAgentEditorAgents(ctx, ""))
372+
assertNoError(t, listAgentEditorAgents(ctx, ""))
373373

374374
out := buf.String()
375375
assertContainsStr(t, out, "Qualified Name")
@@ -429,7 +429,7 @@ func TestShowAgentEditorKnowledgeBases_Mock(t *testing.T) {
429429
}
430430

431431
ctx, buf := newMockCtx(t, withBackend(mb), withHierarchy(h))
432-
assertNoError(t, showAgentEditorKnowledgeBases(ctx, ""))
432+
assertNoError(t, listAgentEditorKnowledgeBases(ctx, ""))
433433

434434
out := buf.String()
435435
assertContainsStr(t, out, "Qualified Name")
@@ -488,7 +488,7 @@ func TestShowAgentEditorConsumedMCPServices_Mock(t *testing.T) {
488488
}
489489

490490
ctx, buf := newMockCtx(t, withBackend(mb), withHierarchy(h))
491-
assertNoError(t, showAgentEditorConsumedMCPServices(ctx, ""))
491+
assertNoError(t, listAgentEditorConsumedMCPServices(ctx, ""))
492492

493493
out := buf.String()
494494
assertContainsStr(t, out, "Qualified Name")

mdl/executor/cmd_agenteditor_models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/mendixlabs/mxcli/sdk/agenteditor"
1717
)
1818

19-
// showAgentEditorModels handles SHOW MODELS [IN module].
20-
func showAgentEditorModels(ctx *ExecContext, moduleName string) error {
19+
// listAgentEditorModels handles SHOW MODELS [IN module].
20+
func listAgentEditorModels(ctx *ExecContext, moduleName string) error {
2121
if !ctx.Connected() {
2222
return mdlerrors.NewNotConnected()
2323
}

mdl/executor/cmd_associations.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ func execDropAssociation(ctx *ExecContext, s *ast.DropAssociationStmt) error {
247247
return mdlerrors.NewNotFound("association", s.Name.String())
248248
}
249249

250-
// showAssociations handles SHOW ASSOCIATIONS command.
251-
func showAssociations(ctx *ExecContext, moduleName string) error {
250+
// listAssociations handles SHOW ASSOCIATIONS command.
251+
func listAssociations(ctx *ExecContext, moduleName string) error {
252252
// Build module ID -> name map (single query)
253253
modules, err := ctx.Backend.ListModules()
254254
if err != nil {
@@ -333,8 +333,8 @@ func showAssociations(ctx *ExecContext, moduleName string) error {
333333
return writeResult(ctx, result)
334334
}
335335

336-
// showAssociation handles SHOW ASSOCIATION command.
337-
func showAssociation(ctx *ExecContext, name *ast.QualifiedName) error {
336+
// listAssociation handles SHOW ASSOCIATION command.
337+
func listAssociation(ctx *ExecContext, name *ast.QualifiedName) error {
338338
if name == nil {
339339
return mdlerrors.NewValidation("association name required")
340340
}

mdl/executor/cmd_associations_mock_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestShowAssociations_Mock(t *testing.T) {
3030
}
3131

3232
ctx, buf := newMockCtx(t, withBackend(mb))
33-
assertNoError(t, showAssociations(ctx, ""))
33+
assertNoError(t, listAssociations(ctx, ""))
3434

3535
out := buf.String()
3636
assertContainsStr(t, out, "MyModule.Order_Customer")
@@ -68,7 +68,7 @@ func TestShowAssociations_Mock_FilterByModule(t *testing.T) {
6868
}
6969

7070
ctx, buf := newMockCtx(t, withBackend(mb))
71-
assertNoError(t, showAssociations(ctx, "HR"))
71+
assertNoError(t, listAssociations(ctx, "HR"))
7272

7373
out := buf.String()
7474
assertNotContainsStr(t, out, "Sales.Order_Product")

mdl/executor/cmd_businessevents.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"github.com/mendixlabs/mxcli/model"
1313
)
1414

15-
// showBusinessEventServices displays a table of all business event service documents.
16-
func showBusinessEventServices(ctx *ExecContext, inModule string) error {
15+
// listBusinessEventServices displays a table of all business event service documents.
16+
func listBusinessEventServices(ctx *ExecContext, inModule string) error {
1717
if !ctx.Connected() {
1818
return mdlerrors.NewNotConnected()
1919
}
@@ -86,14 +86,14 @@ func showBusinessEventServices(ctx *ExecContext, inModule string) error {
8686
return writeResult(ctx, result)
8787
}
8888

89-
// showBusinessEventClients displays a table of all business event client documents.
90-
func showBusinessEventClients(ctx *ExecContext, inModule string) error {
89+
// listBusinessEventClients displays a table of all business event client documents.
90+
func listBusinessEventClients(ctx *ExecContext, inModule string) error {
9191
fmt.Fprintln(ctx.Output, "Business event clients are not yet implemented.")
9292
return nil
9393
}
9494

95-
// showBusinessEvents displays a table of individual messages across all business event services.
96-
func showBusinessEvents(ctx *ExecContext, inModule string) error {
95+
// listBusinessEvents displays a table of individual messages across all business event services.
96+
func listBusinessEvents(ctx *ExecContext, inModule string) error {
9797
if !ctx.Connected() {
9898
return mdlerrors.NewNotConnected()
9999
}

mdl/executor/cmd_businessevents_mock_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestShowBusinessEventServices_Mock(t *testing.T) {
2828
}
2929

3030
ctx, buf := newMockCtx(t, withBackend(mb), withHierarchy(h))
31-
assertNoError(t, showBusinessEventServices(ctx, ""))
31+
assertNoError(t, listBusinessEventServices(ctx, ""))
3232

3333
out := buf.String()
3434
assertContainsStr(t, out, "QualifiedName")
@@ -37,7 +37,7 @@ func TestShowBusinessEventServices_Mock(t *testing.T) {
3737

3838
func TestShowBusinessEventClients_Mock(t *testing.T) {
3939
ctx, buf := newMockCtx(t)
40-
assertNoError(t, showBusinessEventClients(ctx, ""))
40+
assertNoError(t, listBusinessEventClients(ctx, ""))
4141
assertContainsStr(t, buf.String(), "not yet implemented")
4242
}
4343

mdl/executor/cmd_constants.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/mendixlabs/mxcli/model"
1414
)
1515

16-
// showConstants handles SHOW CONSTANTS command.
17-
func showConstants(ctx *ExecContext, moduleName string) error {
16+
// listConstants handles SHOW CONSTANTS command.
17+
func listConstants(ctx *ExecContext, moduleName string) error {
1818
constants, err := ctx.Backend.ListConstants()
1919
if err != nil {
2020
return mdlerrors.NewBackend("list constants", err)
@@ -340,9 +340,9 @@ func createConstant(ctx *ExecContext, stmt *ast.CreateConstantStmt) error {
340340
return nil
341341
}
342342

343-
// showConstantValues handles SHOW CONSTANT VALUES command.
343+
// listConstantValues handles SHOW CONSTANT VALUES command.
344344
// Displays one row per constant per configuration for easy comparison.
345-
func showConstantValues(ctx *ExecContext, moduleName string) error {
345+
func listConstantValues(ctx *ExecContext, moduleName string) error {
346346
constants, err := ctx.Backend.ListConstants()
347347
if err != nil {
348348
return mdlerrors.NewBackend("list constants", err)

0 commit comments

Comments
 (0)