{
  "schema_version": 1,
  "generated_at": "2026-11-18T10:08:15.806800+00:00",
  "classification": "constructed SQLite semantics demonstration",
  "environment": {
    "python": "3.12.3",
    "sqlite": "3.45.1",
    "sqlite_source_id": "2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1",
    "compile_options": [
      "ATOMIC_INTRINSICS=1",
      "COMPILER=gcc-13.3.0",
      "DEFAULT_AUTOVACUUM",
      "DEFAULT_CACHE_SIZE=-2000",
      "DEFAULT_FILE_FORMAT=4",
      "DEFAULT_JOURNAL_SIZE_LIMIT=-1",
      "DEFAULT_MMAP_SIZE=0",
      "DEFAULT_PAGE_SIZE=4096",
      "DEFAULT_PCACHE_INITSZ=20",
      "DEFAULT_RECURSIVE_TRIGGERS",
      "DEFAULT_SECTOR_SIZE=4096",
      "DEFAULT_SYNCHRONOUS=2",
      "DEFAULT_WAL_AUTOCHECKPOINT=1000",
      "DEFAULT_WAL_SYNCHRONOUS=2",
      "DEFAULT_WORKER_THREADS=0",
      "DIRECT_OVERFLOW_READ",
      "ENABLE_COLUMN_METADATA",
      "ENABLE_DBSTAT_VTAB",
      "ENABLE_FTS3",
      "ENABLE_FTS3_PARENTHESIS",
      "ENABLE_FTS3_TOKENIZER",
      "ENABLE_FTS4",
      "ENABLE_FTS5",
      "ENABLE_LOAD_EXTENSION",
      "ENABLE_MATH_FUNCTIONS",
      "ENABLE_PREUPDATE_HOOK",
      "ENABLE_RTREE",
      "ENABLE_SESSION",
      "ENABLE_STMTVTAB",
      "ENABLE_UNLOCK_NOTIFY",
      "ENABLE_UPDATE_DELETE_LIMIT",
      "HAVE_ISNAN",
      "LIKE_DOESNT_MATCH_BLOBS",
      "MALLOC_SOFT_LIMIT=1024",
      "MAX_ATTACHED=10",
      "MAX_COLUMN=2000",
      "MAX_COMPOUND_SELECT=500",
      "MAX_DEFAULT_PAGE_SIZE=32768",
      "MAX_EXPR_DEPTH=1000",
      "MAX_FUNCTION_ARG=127",
      "MAX_LENGTH=1000000000",
      "MAX_LIKE_PATTERN_LENGTH=50000",
      "MAX_MMAP_SIZE=0x7fff0000",
      "MAX_PAGE_COUNT=0xfffffffe",
      "MAX_PAGE_SIZE=65536",
      "MAX_SCHEMA_RETRY=25",
      "MAX_SQL_LENGTH=1000000000",
      "MAX_TRIGGER_DEPTH=1000",
      "MAX_VARIABLE_NUMBER=250000",
      "MAX_VDBE_OP=250000000",
      "MAX_WORKER_THREADS=8",
      "MUTEX_PTHREADS",
      "SECURE_DELETE",
      "SOUNDEX",
      "SYSTEM_MALLOC",
      "TEMP_STORE=1",
      "THREADSAFE=1",
      "USE_URI"
    ]
  },
  "code_sha256": "3b4613eafcc274b41ded470336585d6c3a026943ffce935f2c94d28fc894c684",
  "schema": [
    "CREATE TABLE items(id INTEGER PRIMARY KEY, label TEXT NOT NULL, active INTEGER)",
    "CREATE UNIQUE INDEX one_active ON items(label) WHERE active = 1"
  ],
  "state_query": "SELECT id, label, active FROM items ORDER BY id",
  "membership_query": "SELECT id FROM items WHERE active=1 ORDER BY id",
  "cases": [
    {
      "case": "included",
      "sql": "INSERT INTO items VALUES(1, 'group-a', 1)",
      "error": null,
      "rows": [
        [
          1,
          "group-a",
          1
        ]
      ],
      "selected_ids": [
        1
      ],
      "predicate_truth": [
        [
          1,
          1
        ]
      ]
    },
    {
      "case": "excluded_false",
      "sql": "INSERT INTO items VALUES(2, 'group-a', 0)",
      "error": null,
      "rows": [
        [
          1,
          "group-a",
          1
        ],
        [
          2,
          "group-a",
          0
        ]
      ],
      "selected_ids": [
        1
      ],
      "predicate_truth": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ]
    },
    {
      "case": "excluded_null",
      "sql": "INSERT INTO items VALUES(3, 'group-a', NULL)",
      "error": null,
      "rows": [
        [
          1,
          "group-a",
          1
        ],
        [
          2,
          "group-a",
          0
        ],
        [
          3,
          "group-a",
          null
        ]
      ],
      "selected_ids": [
        1
      ],
      "predicate_truth": [
        [
          1,
          1
        ],
        [
          2,
          0
        ],
        [
          3,
          null
        ]
      ]
    },
    {
      "case": "duplicate_included",
      "sql": "INSERT INTO items VALUES(4, 'group-a', 1)",
      "error": {
        "code": 2067,
        "name": "SQLITE_CONSTRAINT_UNIQUE",
        "message": "UNIQUE constraint failed: items.label"
      },
      "rows": [
        [
          1,
          "group-a",
          1
        ],
        [
          2,
          "group-a",
          0
        ],
        [
          3,
          "group-a",
          null
        ]
      ],
      "selected_ids": [
        1
      ],
      "predicate_truth": [
        [
          1,
          1
        ],
        [
          2,
          0
        ],
        [
          3,
          null
        ]
      ]
    },
    {
      "case": "promote_conflict",
      "sql": "UPDATE items SET active=1 WHERE id=2",
      "error": {
        "code": 2067,
        "name": "SQLITE_CONSTRAINT_UNIQUE",
        "message": "UNIQUE constraint failed: items.label"
      },
      "rows": [
        [
          1,
          "group-a",
          1
        ],
        [
          2,
          "group-a",
          0
        ],
        [
          3,
          "group-a",
          null
        ]
      ],
      "selected_ids": [
        1
      ],
      "predicate_truth": [
        [
          1,
          1
        ],
        [
          2,
          0
        ],
        [
          3,
          null
        ]
      ]
    },
    {
      "case": "leave_subset",
      "sql": "UPDATE items SET active=0 WHERE id=1",
      "error": null,
      "rows": [
        [
          1,
          "group-a",
          0
        ],
        [
          2,
          "group-a",
          0
        ],
        [
          3,
          "group-a",
          null
        ]
      ],
      "selected_ids": [],
      "predicate_truth": [
        [
          1,
          0
        ],
        [
          2,
          0
        ],
        [
          3,
          null
        ]
      ]
    },
    {
      "case": "promote_after_release",
      "sql": "UPDATE items SET active=1 WHERE id=2",
      "error": null,
      "rows": [
        [
          1,
          "group-a",
          0
        ],
        [
          2,
          "group-a",
          1
        ],
        [
          3,
          "group-a",
          null
        ]
      ],
      "selected_ids": [
        2
      ],
      "predicate_truth": [
        [
          1,
          0
        ],
        [
          2,
          1
        ],
        [
          3,
          null
        ]
      ]
    }
  ],
  "indexes": [
    [
      0,
      "one_active",
      1,
      "c",
      1
    ]
  ],
  "integrity_check": [
    [
      "ok"
    ]
  ],
  "reopened": {
    "rows": [
      [
        1,
        "group-a",
        0
      ],
      [
        2,
        "group-a",
        1
      ],
      [
        3,
        "group-a",
        null
      ]
    ],
    "selected_ids": [
      2
    ],
    "predicate_truth": [
      [
        1,
        0
      ],
      [
        2,
        1
      ],
      [
        3,
        null
      ]
    ]
  },
  "limits": "Seven dependent steps on one fresh database, single connection and autocommit statements. NOT NULL key isolates predicate NULL from key NULL. No planner-choice, concurrency, crash, storage-size, speed or PostgreSQL measurement."
}
