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

Method ParentMPath

common/storage/sql/postgres.go:23–25  ·  view source on GitHub ↗
(levelKey string, mpathes ...string)

Source from the content-addressed store, hash-verified

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), '.')`
25}
26
27func (p *postgresHelper) Hash(s ...string) string {
28 return `ENCODE(DIGEST(` + p.Concat(s...) + `, 'sha1'), 'hex')`

Callers 1

HashParentMethod · 0.95

Calls 1

ConcatMethod · 0.95

Tested by

no test coverage detected