mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
## 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)
18 lines
325 B
Go
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), ", ")
|
|
}
|