AskSQL API Reference (core v0.10.0)
    Preparing search index...

    Function jsonArrayElementOf

    • The element type of a JSON ARRAY column, or null if the values are not all arrays. Real schemas keep lists of ids this way (measured on a 65-table production schema: client_ids, room_id, equipment_id are all [123504,312]), and without a hint the model wrote JSON_CONTAINS(col, '["1"]') - a string against numbers - which matched nothing and raised no error. The element type only; never an element.

      Parameters

      • values: readonly unknown[]

      Returns "string" | "number" | null