Remove plugin data query projection

This commit is contained in:
npc0-hue
2026-08-21 15:36:49 +08:00
parent fc86b24699
commit 8aeb488179
20 changed files with 91 additions and 703 deletions
+2 -26
View File
@@ -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 {