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

Method JSONArrayContains

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

JSONArrayContains returns SQL + the arg to check if a JSON array column contains a given text value. SQLite: "column LIKE ?" with arg `%"value"%` PostgreSQL: "column::jsonb @> ?::jsonb" with arg `["value"]`

(column, value string)

Source from the content-addressed store, hash-verified

103 // SQLite: "column LIKE ?" with arg `%"value"%`
104 // PostgreSQL: "column::jsonb @> ?::jsonb" with arg `["value"]`
105 JSONArrayContains(column, value string) (string, interface{})
106
107 // JSONArrayElements returns a FROM-clause table-function fragment that
108 // unnests a JSON text-array column into one row per element, plus the

Callers 3

ListDocumentsMethod · 0.65
ListItemsMethod · 0.65
listItemsFTSMethod · 0.65

Implementers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected