diff --git a/compose/chart.cue b/compose/chart.cue index b24c0eaee..e35ec31a8 100644 --- a/compose/chart.cue +++ b/compose/chart.cue @@ -12,7 +12,7 @@ chart: schema.#Resource & { struct: { id: schema.IdField handle: schema.HandleField - name: {} + name: {sortable: true} config: { goType: "types.ChartConfig" } namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" } diff --git a/compose/module-field.cue b/compose/module-field.cue index 6b21014f6..5b8050a69 100644 --- a/compose/module-field.cue +++ b/compose/module-field.cue @@ -16,8 +16,8 @@ moduleField: schema.#Resource & { module_id: { ident: "moduleID", goType: "uint64", storeIdent: "rel_module" } place: { goType: "int" } kind: { goType: "string" } - name: {} - label: {} + name: {sortable: true} + label: {sortable: true} options: { goType: "types.ModuleFieldOptions" } encoding_strategy: { goType: "types.EncodingStrategy" } privacy: { goType: "types.DataPrivacyConfig" } diff --git a/compose/module.cue b/compose/module.cue index df8ecb6bb..65c4ee6c1 100644 --- a/compose/module.cue +++ b/compose/module.cue @@ -18,7 +18,7 @@ module: schema.#Resource & { privacy: { goType: "types.DataPrivacyConfig" } fields: { goType: "types.ModuleFieldSet", store: false } namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" } - name: {} + name: {sortable: true} created_at: schema.SortableTimestampField updated_at: schema.SortableTimestampNilField diff --git a/compose/page.cue b/compose/page.cue index bff0af7a2..8cfeb8a93 100644 --- a/compose/page.cue +++ b/compose/page.cue @@ -19,8 +19,8 @@ page: schema.#Resource & { blocks: { goType: "types.PageBlocks" } children: { goType: "types.PageSet", store: false } visible: { goType: "bool" } - weight: { goType: "int" } - title: { goType: "string" } + weight: { goType: "int", sortable: true } + title: { goType: "string", sortable: true } description: { goType: "string" } created_at: schema.SortableTimestampField diff --git a/store/adapters/rdbms/rdbms.gen.go b/store/adapters/rdbms/rdbms.gen.go index 538d4304d..867c64360 100644 --- a/store/adapters/rdbms/rdbms.gen.go +++ b/store/adapters/rdbms/rdbms.gen.go @@ -6398,6 +6398,7 @@ func (Store) sortableComposeChartFields() map[string]string { "deletedat": "deleted_at", "handle": "handle", "id": "id", + "name": "name", "updated_at": "updated_at", "updatedat": "updated_at", } @@ -6431,6 +6432,8 @@ func (s *Store) collectComposeChartCursorValues(res *composeType.Chart, cc ...*f case "handle": cur.Set(c.Column, res.Handle, c.Descending) hasUnique = true + case "name": + cur.Set(c.Column, res.Name, c.Descending) case "createdAt": cur.Set(c.Column, res.CreatedAt, c.Descending) case "updatedAt": @@ -6970,6 +6973,7 @@ func (Store) sortableComposeModuleFields() map[string]string { "deletedat": "deleted_at", "handle": "handle", "id": "id", + "name": "name", "updated_at": "updated_at", "updatedat": "updated_at", } @@ -7003,6 +7007,8 @@ func (s *Store) collectComposeModuleCursorValues(res *composeType.Module, cc ... case "handle": cur.Set(c.Column, res.Handle, c.Descending) hasUnique = true + case "name": + cur.Set(c.Column, res.Name, c.Descending) case "createdAt": cur.Set(c.Column, res.CreatedAt, c.Descending) case "updatedAt": @@ -7290,7 +7296,9 @@ func (s *Store) LookupComposeModuleFieldByModuleIDName(ctx context.Context, modu // This function is auto-generated func (Store) sortableComposeModuleFieldFields() map[string]string { return map[string]string{ - "id": "id", + "id": "id", + "label": "label", + "name": "name", } } @@ -7319,6 +7327,10 @@ func (s *Store) collectComposeModuleFieldCursorValues(res *composeType.ModuleFie case "id": cur.Set(c.Column, res.ID, c.Descending) pkID = true + case "name": + cur.Set(c.Column, res.Name, c.Descending) + case "label": + cur.Set(c.Column, res.Label, c.Descending) } } } @@ -8436,8 +8448,10 @@ func (Store) sortableComposePageFields() map[string]string { "deletedat": "deleted_at", "handle": "handle", "id": "id", + "title": "title", "updated_at": "updated_at", "updatedat": "updated_at", + "weight": "weight", } } @@ -8469,6 +8483,10 @@ func (s *Store) collectComposePageCursorValues(res *composeType.Page, cc ...*fil case "handle": cur.Set(c.Column, res.Handle, c.Descending) hasUnique = true + case "weight": + cur.Set(c.Column, res.Weight, c.Descending) + case "title": + cur.Set(c.Column, res.Title, c.Descending) case "createdAt": cur.Set(c.Column, res.CreatedAt, c.Descending) case "updatedAt":