Commit Graph

7 Commits

Author SHA1 Message Date
Eric Promislow 4f27f71146
Sort by ipaddr (#760)
* SQL codegen: map the SortAsIP option to the 'inet_aton' function call

* Implement and test sorting IP addresses by their underlying int64 value.

* Implement parsing 'ip(x)' as an IP-sort directive.

* Fix a change rebasing missed.
2025-10-15 13:45:10 -07:00
Felipe Gehrke 6af3f6dcee
adding revision check (#854)
* added revision check

* added new revision check and test

* removed unecessary spaces

* added equality test

* fixed test
2025-10-09 09:23:56 -03:00
Felipe Gehrke 3cac88141b
#50968 - Single SQL Transaction for projectsornamespaces filter (#758)
* working for positive case

* changed to custom code

* removed comment

* added tests

* fixing ci error

* one more fix

* Update proxy_store tests for projectornamespace parsing.

Since we no longer need to execute a db query, and just return a filter,
we can drop a lot of code.

* added distinct back to conform with other queries

* one more fix

---------

Co-authored-by: Eric Promislow <epromislow@suse.com>
2025-08-08 16:07:54 -03:00
Eric Promislow 496a6f8968
Hard-wire external associations: 3 sections in, this one is 4/7 (#645)
* Continue rebasing.

* Wrote unit tests for external associations.

* Fix the generated SQL.

Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs.

* whitespace fix post rebase

* We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName"

* Fix the database calls: drop the key

* Fix breakage during automatic rebase merging gone wrong.

* ws fix - NFC

* Post rebase-merge fixes

* Fix rebase-driven merge.

* Fix rebase breakage.

* go-uber v0.5.2 prefers real arg names to '<argN>'
2025-06-25 16:10:48 -07:00
Tom Lebreux cb0d9d6d54
Remove limit and continue param for SQL cache (#643) 2025-05-27 09:53:10 -04:00
Eric Promislow 89268ba86b
Sort-indirect PR broken into smaller parts: part 2/6 - fix the Sort part of ListOptions (#611)
* Move types related to list options and sql queries into their own package.

The problem having these in the informer package is that eventually code
in other packages will need to import `informer` only for constants or types,
but some members of the informer package may already depend on those. Best to
move type definitions into their own simpler package.

* Fix the ListOptions sort field.

Instead of making it a single array-ish field, convert it into a
true array of Sort Directives.  Easier to read, less bending backwards.

* Rebasing (or human error) duplicated 'NewSortList'.
2025-04-25 10:15:20 -07:00
Eric Promislow 2b227dbd22
Move types related to list options and sql queries into their own package. (#610)
The problem having these in the informer package is that eventually code
in other packages will need to import `informer` only for constants or types,
but some members of the informer package may already depend on those. Best to
move type definitions into their own simpler package.
2025-04-25 09:11:09 -07:00