Skip to content

Commit 65c3751

Browse files
committed
review feedback addressed.
1 parent c411356 commit 65c3751

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

internal/service/odb/db_system_shapes_list_data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
1+
// Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
22

33
package odb
44

internal/service/odb/db_system_shapes_list_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
1+
// Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
22

33
package odb_test
44

internal/service/odb/gi_versions_list_data_source.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
1+
// Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
22

33
package odb
44

@@ -57,13 +57,20 @@ func (d *dataSourceGiVersionsList) Read(ctx context.Context, req datasource.Read
5757
if !data.Shape.IsNull() {
5858
input.Shape = data.Shape.ValueStringPointer()
5959
}
60-
out, err := conn.ListGiVersions(ctx, &input)
61-
if err != nil {
62-
resp.Diagnostics.AddError(
63-
create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameGiVersionsList, "", err),
64-
err.Error(),
65-
)
66-
return
60+
paginator := odb.NewListGiVersionsPaginator(conn, &input)
61+
var out odb.ListGiVersionsOutput
62+
for paginator.HasMorePages() {
63+
page, err := paginator.NextPage(ctx)
64+
if err != nil {
65+
resp.Diagnostics.AddError(
66+
create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameGiVersionsList, "", err),
67+
err.Error(),
68+
)
69+
return
70+
}
71+
if page != nil && len(page.GiVersions) > 0 {
72+
out.GiVersions = append(out.GiVersions, page.GiVersions...)
73+
}
6774
}
6875
resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...)
6976
if resp.Diagnostics.HasError() {

internal/service/odb/gi_versions_list_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
1+
// Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
22

33
package odb_test
44

0 commit comments

Comments
 (0)