sqlite: json_extract(col, '$.key') IS NOT NULL (matches
buildJsonHasKey in src/dialects/sqlite/index.ts).
mssql: JSON_VALUE(col, '$.key') IS NOT NULL (standard SQL Server
workaround pattern; note this cannot distinguish "key present with a
JSON null value" from "key absent").
Does the JSON object in
exprhave the given top-level (or path-qualified, dotted) key?JSON_CONTAINS_PATH(col, 'one', '$.key')(matchesbuildJsonHasKeyinsrc/dialects/{mysql,mariadb}/index.ts).?key-existence operator ->col ? 'key'(top-level keys only, matching jsonb semantics).json_extract(col, '$.key') IS NOT NULL(matchesbuildJsonHasKeyinsrc/dialects/sqlite/index.ts).JSON_VALUE(col, '$.key') IS NOT NULL(standard SQL Server workaround pattern; note this cannot distinguish "key present with a JSON null value" from "key absent").JSON_EXISTS(col, '$.key').ARRAY_CONTAINS('key'::VARIANT, OBJECT_KEYS(col)).col.key IS NOT NULLreliably detects key presence.JSON_EXISTS(col, '$.key')(Db2 11.5+ JSON path predicates).JSONHas(col, 'key').