Skip to content

Commit 0d27543

Browse files
authored
chore(sdb): change default ordering to created_at_desc (#2049)
1 parent eadb80a commit 0d27543

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/serverless_sqldb/v1alpha1/serverless_sqldb_sdk.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ func (enum *DatabaseStatus) UnmarshalJSON(data []byte) error {
109109
type ListDatabaseBackupsRequestOrderBy string
110110

111111
const (
112-
ListDatabaseBackupsRequestOrderByCreatedAtAsc = ListDatabaseBackupsRequestOrderBy("created_at_asc")
113112
ListDatabaseBackupsRequestOrderByCreatedAtDesc = ListDatabaseBackupsRequestOrderBy("created_at_desc")
113+
ListDatabaseBackupsRequestOrderByCreatedAtAsc = ListDatabaseBackupsRequestOrderBy("created_at_asc")
114114
)
115115

116116
func (enum ListDatabaseBackupsRequestOrderBy) String() string {
117117
if enum == "" {
118118
// return default value if empty
119-
return "created_at_asc"
119+
return "created_at_desc"
120120
}
121121
return string(enum)
122122
}
@@ -326,7 +326,7 @@ type ListDatabaseBackupsRequest struct {
326326
PageSize *uint32 `json:"-"`
327327

328328
// OrderBy: sorting criteria. One of `created_at_asc`, `created_at_desc`.
329-
// Default value: created_at_asc
329+
// Default value: created_at_desc
330330
OrderBy ListDatabaseBackupsRequestOrderBy `json:"-"`
331331
}
332332

@@ -701,7 +701,7 @@ func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.Reque
701701
return &resp, nil
702702
}
703703

704-
// ListDatabaseBackups: List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
704+
// ListDatabaseBackups: List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in descending order, though this can be modified via the order_by field.
705705
func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.RequestOption) (*ListDatabaseBackupsResponse, error) {
706706
var err error
707707

0 commit comments

Comments
 (0)