Files
tasks/common/persistence/sql/sqlplugin/util.go
Yichao YangandGitHub 99b14b1750 CHASM: SQL separate ID spaces (#8915)
## What changed?
- Support separate ID spaces for different archetypes in SQL
persistence.

## Why?
- Separate ID space workstream

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)
2026-01-14 20:48:36 -08:00

18 lines
325 B
Go

package sqlplugin
import (
"strings"
)
func appendPrefix(prefix string, fields []string) []string {
out := make([]string, len(fields))
for i, field := range fields {
out[i] = prefix + field
}
return out
}
func BuildNamedPlaceholder(fields ...string) string {
return strings.Join(appendPrefix(":", fields), ", ")
}