Remove plugin data query projection
This commit is contained in:
@@ -572,32 +572,8 @@ func validateGameClientBridgeManifest(field string, bridge domain.GameClientBrid
|
||||
if template.PollIntervalSeconds < 0 || template.PollIntervalSeconds > 86400 {
|
||||
violations = append(violations, prefix+".pollIntervalSeconds is invalid")
|
||||
}
|
||||
projectsRows := template.SQLRef != "" || template.RowTarget != nil
|
||||
if projectsRows {
|
||||
if !safeRelativeSQLRef(template.SQLRef) {
|
||||
violations = append(violations, prefix+".sqlRef must reference a package-relative SQL asset")
|
||||
}
|
||||
if template.RowTarget == nil {
|
||||
violations = append(violations, prefix+".rowTarget is required for projected queries")
|
||||
} else {
|
||||
target := template.RowTarget
|
||||
if !clientManagerIdentifierPattern.MatchString(target.Collection) || len(target.UpsertKeys) == 0 || len(target.ColumnMappings) == 0 {
|
||||
violations = append(violations, prefix+".rowTarget must declare a collection, upsert keys, and column mappings")
|
||||
}
|
||||
if target.WriteMode != "" && target.WriteMode != domain.PluginDataRowWriteModeMerge && target.WriteMode != domain.PluginDataRowWriteModeReplace {
|
||||
violations = append(violations, prefix+".rowTarget.writeMode must be merge or replace")
|
||||
}
|
||||
for _, key := range target.UpsertKeys {
|
||||
if !clientManagerIdentifierPattern.MatchString(key) {
|
||||
violations = append(violations, prefix+".rowTarget upsert key is invalid")
|
||||
}
|
||||
}
|
||||
for destination, source := range target.ColumnMappings {
|
||||
if !clientManagerIdentifierPattern.MatchString(destination) || !clientManagerIdentifierPattern.MatchString(source) {
|
||||
violations = append(violations, prefix+".rowTarget column mapping is invalid")
|
||||
}
|
||||
}
|
||||
}
|
||||
if template.SQLRef != "" && !safeRelativeSQLRef(template.SQLRef) {
|
||||
violations = append(violations, prefix+".sqlRef must reference a package-relative SQL asset")
|
||||
}
|
||||
transport, exists := transports[template.TransportKey]
|
||||
if !exists {
|
||||
|
||||
Reference in New Issue
Block a user