MCPcopy Create free account
hub / github.com/pydio/cells / Concat

Method Concat

common/storage/sql/postgres.go:15–21  ·  view source on GitHub ↗
(s ...string)

Source from the content-addressed store, hash-verified

13type postgresHelper struct{}
14
15func (p *postgresHelper) Concat(s ...string) string {
16 if len(s) == 1 {
17 return s[0]
18 }
19
20 return `CONCAT(` + strings.Join(s, ", ") + `)`
21}
22
23func (p *postgresHelper) ParentMPath(levelKey string, mpathes ...string) string {
24 return `array_to_string(ARRAY(SELECT unnest(string_to_array(` + p.Concat(mpathes...) + `, '.')) LIMIT ` + levelKey + ` - 1), '.')`

Callers 5

ParentMPathMethod · 0.95
HashMethod · 0.95
MPathOrderingMethod · 0.95
FirstAvailableSlotMethod · 0.95

Calls 1

JoinMethod · 0.45

Tested by

no test coverage detected