MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / JSONExtractPath

Method JSONExtractPath

internal/store/dialect.go:275–278  ·  view source on GitHub ↗
(column, path string)

Source from the content-addressed store, hash-verified

273}
274
275func (d *postgresDialect) JSONExtractPath(column, path string) string {
276 parts := strings.Split(path, ".")
277 return fmt.Sprintf("%s #>> '{%s}'", column, strings.Join(parts, ","))
278}
279
280func (d *postgresDialect) JSONSet(column, key string) string {
281 return fmt.Sprintf("jsonb_set(COALESCE(%s, '{}')::jsonb, '{%s}', to_jsonb(?::text))", column, key)

Callers

nothing calls this directly

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected