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

Method JSONExtractPath

internal/store/dialect.go:39–39  ·  view source on GitHub ↗

JSONExtractPath returns SQL to extract a value at a dotted path from a JSON column. SQLite: json_extract(col, '$.path.to.key') PostgreSQL: col #>> '{path,to,key}'

(column, path string)

Source from the content-addressed store, hash-verified

37 // SQLite: json_extract(col, '$.path.to.key')
38 // PostgreSQL: col #>> '{path,to,key}'
39 JSONExtractPath(column, path string) string
40
41 // JSONFieldText, JSONFieldEquals and JSONFieldOrder read an item field
42 // value by its JSON type, identically on both dialects (BUG-3221; the

Implementers 2

sqliteDialectinternal/store/dialect.go
postgresDialectinternal/store/dialect.go

Calls

no outgoing calls

Tested by 1