1
0
mirror of https://github.com/rancher/steve.git synced 2025-06-27 23:37:10 +00:00
steve/pkg/stores/sqlpartition
Eric Promislow 3b45729415
Generate field names with brackets when needed. (#477)
* Generate field names with brackets when needed.

* Stop hard-wiring complex selectors as `["field1", "field2[sub-field3]"]`

and instead represent them as a more consistent `["field1", "field2", "sub-field3"]`

* Convert all filter strings ending with square brackets to an array.

Stop special-casing 'metadata.labels[X]' and handle any query string that ends with '[...]'.

* Stop checking for pre-bracketed terms in constant field-accessor arrays.

In this commit we stop converting string arrays like
`["metadata", "labels[k8s.io/deepcode]"]` into the database field
`"metadata.labels[k8s.io/deepcode]"` and instead will do a
naive `join` to give `metadata[labels[k8s.io/deepcode]]`.  The solution
is to never express the above terms in separate fields, like
`["metadata", "labels", "k8s.io/deepcode"]`. This also better reflects
the stucture of the referenced object.

* gofmt changes

* Simplify comment about 'smartJoin'.
2025-02-25 10:39:29 -08:00
..
listprocessor Generate field names with brackets when needed. (#477) 2025-02-25 10:39:29 -08:00
queryparser Index arbitrary labels (#317) 2025-01-30 11:57:23 -08:00
selection Index arbitrary labels (#317) 2025-01-30 11:57:23 -08:00
partition_mocks_test.go Move lasso SQL cache in Steve (#452) 2025-01-17 09:34:48 -05:00
partitioner_test.go Generate field names with brackets when needed. (#477) 2025-02-25 10:39:29 -08:00
partitioner.go Move lasso SQL cache in Steve (#452) 2025-01-17 09:34:48 -05:00
store_test.go Generate field names with brackets when needed. (#477) 2025-02-25 10:39:29 -08:00
store.go Move lasso SQL cache in Steve (#452) 2025-01-17 09:34:48 -05:00