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

Method JSONArrayContains

internal/store/dialect.go:387–390  ·  view source on GitHub ↗
(column, value string)

Source from the content-addressed store, hash-verified

385}
386
387func (d *postgresDialect) JSONArrayContains(column, value string) (string, interface{}) {
388 arg, _ := json.Marshal([]string{value}) // a []string always marshals
389 return column + "::jsonb @> ?::jsonb", string(arg)
390}
391
392func (d *postgresDialect) JSONArrayElements(column, alias string) (string, string) {
393 return "jsonb_array_elements_text(" + column + "::jsonb) AS " + alias + "(value)", alias + ".value"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected