(column, value string)
| 241 | } |
| 242 | |
| 243 | func (d *sqliteDialect) JSONArrayContains(column, value string) (string, interface{}) { |
| 244 | // The CASE keeps json_type/json_each away from a malformed row, which |
| 245 | // would otherwise fail the whole query. |
| 246 | return "(CASE WHEN json_valid(" + column + ") THEN (json_type(" + column + ") = 'array' AND EXISTS (SELECT 1 FROM json_each(" + column + ") je_tag WHERE je_tag.type = 'text' AND je_tag.value = ?)) ELSE 0 END)", value |
| 247 | } |
| 248 | |
| 249 | func (d *sqliteDialect) JSONArrayElements(column, alias string) (string, string) { |
| 250 | return "json_each(" + column + ") " + alias, alias + ".value" |
nothing calls this directly
no outgoing calls
no test coverage detected