mirror of
https://github.com/rancher/steve.git
synced 2025-09-04 17:01:16 +00:00
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>'
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package sqltypes
|
||||
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
type Op string
|
||||
|
||||
const (
|
||||
@@ -69,6 +71,36 @@ type Pagination struct {
|
||||
Page int
|
||||
}
|
||||
|
||||
type ExternalDependency struct {
|
||||
SourceGVK string
|
||||
SourceFieldName string
|
||||
TargetGVK string
|
||||
TargetKeyFieldName string
|
||||
TargetFinalFieldName string
|
||||
}
|
||||
|
||||
type ExternalLabelDependency struct {
|
||||
SourceGVK string
|
||||
SourceLabelName string
|
||||
TargetGVK string
|
||||
TargetKeyFieldName string
|
||||
TargetFinalFieldName string
|
||||
}
|
||||
|
||||
type ExternalGVKUpdates struct {
|
||||
AffectedGVK schema.GroupVersionKind
|
||||
ExternalDependencies []ExternalDependency
|
||||
ExternalLabelDependencies []ExternalLabelDependency
|
||||
}
|
||||
|
||||
type ExternalGVKDependency map[schema.GroupVersionKind]*ExternalGVKUpdates
|
||||
|
||||
type ExternalInfoPacket struct {
|
||||
ExternalDependencies []ExternalDependency
|
||||
ExternalLabelDependencies []ExternalLabelDependency
|
||||
ExternalGVKDependencies ExternalGVKDependency
|
||||
}
|
||||
|
||||
func NewSortList() *SortList {
|
||||
return &SortList{
|
||||
SortDirectives: []Sort{},
|
||||
|
Reference in New Issue
Block a user