significantly simplified the validator and work continues on query

This commit is contained in:
2026-03-03 17:58:31 -05:00
parent 3898c43742
commit e7f20e2cb6
58 changed files with 5446 additions and 5693 deletions

View File

@ -4,8 +4,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "integer"
"type": "integer",
"$id": "type_0_0"
}
]
},
@ -13,47 +13,56 @@
{
"description": "an integer is an integer",
"data": 1,
"valid": true
"valid": true,
"schema_id": "type_0_0"
},
{
"description": "a float with zero fractional part is an integer",
"data": 1.0,
"valid": true
"data": 1,
"valid": true,
"schema_id": "type_0_0"
},
{
"description": "a float is not an integer",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "a string is not an integer",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "a string is still not an integer, even if it looks like one",
"data": "1",
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "an object is not an integer",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "an array is not an integer",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "a boolean is not an integer",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_0_0"
},
{
"description": "null is not an integer",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_0_0"
}
]
},
@ -62,8 +71,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "number"
"type": "number",
"$id": "type_1_0"
}
]
},
@ -71,47 +80,56 @@
{
"description": "an integer is a number",
"data": 1,
"valid": true
"valid": true,
"schema_id": "type_1_0"
},
{
"description": "a float with zero fractional part is a number (and an integer)",
"data": 1.0,
"valid": true
"data": 1,
"valid": true,
"schema_id": "type_1_0"
},
{
"description": "a float is a number",
"data": 1.1,
"valid": true
"valid": true,
"schema_id": "type_1_0"
},
{
"description": "a string is not a number",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_1_0"
},
{
"description": "a string is still not a number, even if it looks like one",
"data": "1",
"valid": false
"valid": false,
"schema_id": "type_1_0"
},
{
"description": "an object is not a number",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_1_0"
},
{
"description": "an array is not a number",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_1_0"
},
{
"description": "a boolean is not a number",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_1_0"
},
{
"description": "null is not a number",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_1_0"
}
]
},
@ -120,8 +138,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string"
"type": "string",
"$id": "type_2_0"
}
]
},
@ -129,47 +147,56 @@
{
"description": "1 is not a string",
"data": 1,
"valid": false
"valid": false,
"schema_id": "type_2_0"
},
{
"description": "a float is not a string",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_2_0"
},
{
"description": "a string is a string",
"data": "foo",
"valid": true
"valid": true,
"schema_id": "type_2_0"
},
{
"description": "a string is still a string, even if it looks like a number",
"data": "1",
"valid": true
"valid": true,
"schema_id": "type_2_0"
},
{
"description": "an empty string is still a string",
"data": "",
"valid": true
"valid": true,
"schema_id": "type_2_0"
},
{
"description": "an object is not a string",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_2_0"
},
{
"description": "an array is not a string",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_2_0"
},
{
"description": "a boolean is not a string",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_2_0"
},
{
"description": "null is not a string",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_2_0"
}
]
},
@ -178,8 +205,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object"
"type": "object",
"$id": "type_3_0"
}
]
},
@ -187,37 +214,44 @@
{
"description": "an integer is not an object",
"data": 1,
"valid": false
"valid": false,
"schema_id": "type_3_0"
},
{
"description": "a float is not an object",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_3_0"
},
{
"description": "a string is not an object",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_3_0"
},
{
"description": "an object is an object",
"data": {},
"valid": true
"valid": true,
"schema_id": "type_3_0"
},
{
"description": "an array is not an object",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_3_0"
},
{
"description": "a boolean is not an object",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_3_0"
},
{
"description": "null is not an object",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_3_0"
}
]
},
@ -226,8 +260,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array"
"type": "array",
"$id": "type_4_0"
}
]
},
@ -235,37 +269,44 @@
{
"description": "an integer is not an array",
"data": 1,
"valid": false
"valid": false,
"schema_id": "type_4_0"
},
{
"description": "a float is not an array",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_4_0"
},
{
"description": "a string is not an array",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_4_0"
},
{
"description": "an object is not an array",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_4_0"
},
{
"description": "an array is an array",
"data": [],
"valid": true
"valid": true,
"schema_id": "type_4_0"
},
{
"description": "a boolean is not an array",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_4_0"
},
{
"description": "null is not an array",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_4_0"
}
]
},
@ -274,8 +315,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "boolean"
"type": "boolean",
"$id": "type_5_0"
}
]
},
@ -283,52 +324,62 @@
{
"description": "an integer is not a boolean",
"data": 1,
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "zero is not a boolean",
"data": 0,
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "a float is not a boolean",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "a string is not a boolean",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "an empty string is a null",
"data": "",
"valid": true
"valid": true,
"schema_id": "type_5_0"
},
{
"description": "an object is not a boolean",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "an array is not a boolean",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_5_0"
},
{
"description": "true is a boolean",
"data": true,
"valid": true
"valid": true,
"schema_id": "type_5_0"
},
{
"description": "false is a boolean",
"data": false,
"valid": true
"valid": true,
"schema_id": "type_5_0"
},
{
"description": "null is not a boolean",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_5_0"
}
]
},
@ -337,8 +388,8 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "null"
"type": "null",
"$id": "type_6_0"
}
]
},
@ -346,52 +397,62 @@
{
"description": "an integer is not null",
"data": 1,
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "a float is not null",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "zero is not null",
"data": 0,
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "a string is not null",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "an empty string is null",
"data": "",
"valid": true
"valid": true,
"schema_id": "type_6_0"
},
{
"description": "an object is not null",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "an array is not null",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "true is not null",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "false is not null",
"data": false,
"valid": false
"valid": false,
"schema_id": "type_6_0"
},
{
"description": "null is null",
"data": null,
"valid": true
"valid": true,
"schema_id": "type_6_0"
}
]
},
@ -400,11 +461,11 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": [
"integer",
"string"
]
],
"$id": "type_7_0"
}
]
},
@ -412,37 +473,44 @@
{
"description": "an integer is valid",
"data": 1,
"valid": true
"valid": true,
"schema_id": "type_7_0"
},
{
"description": "a string is valid",
"data": "foo",
"valid": true
"valid": true,
"schema_id": "type_7_0"
},
{
"description": "a float is invalid",
"data": 1.1,
"valid": false
"valid": false,
"schema_id": "type_7_0"
},
{
"description": "an object is invalid",
"data": {},
"valid": false
"valid": false,
"schema_id": "type_7_0"
},
{
"description": "an array is invalid",
"data": [],
"valid": false
"valid": false,
"schema_id": "type_7_0"
},
{
"description": "a boolean is invalid",
"data": true,
"valid": false
"valid": false,
"schema_id": "type_7_0"
},
{
"description": "null is invalid",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_7_0"
}
]
},
@ -451,10 +519,10 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": [
"string"
]
],
"$id": "type_8_0"
}
]
},
@ -462,12 +530,14 @@
{
"description": "string is valid",
"data": "foo",
"valid": true
"valid": true,
"schema_id": "type_8_0"
},
{
"description": "number is invalid",
"data": 123,
"valid": false
"valid": false,
"schema_id": "type_8_0"
}
]
},
@ -476,12 +546,12 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": [
"array",
"object"
],
"items": {}
"items": {},
"$id": "type_9_0"
}
]
},
@ -493,27 +563,32 @@
2,
3
],
"valid": true
"valid": true,
"schema_id": "type_9_0"
},
{
"description": "object is valid",
"data": {},
"valid": true
"valid": true,
"schema_id": "type_9_0"
},
{
"description": "number is invalid",
"data": 123,
"valid": false
"valid": false,
"schema_id": "type_9_0"
},
{
"description": "string is invalid",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_9_0"
},
{
"description": "null is invalid",
"data": null,
"valid": false
"valid": false,
"schema_id": "type_9_0"
}
]
},
@ -522,13 +597,13 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": [
"array",
"object",
"null"
],
"items": {}
"items": {},
"$id": "type_10_0"
}
]
},
@ -540,27 +615,32 @@
2,
3
],
"valid": true
"valid": true,
"schema_id": "type_10_0"
},
{
"description": "object is valid",
"data": {},
"valid": true
"valid": true,
"schema_id": "type_10_0"
},
{
"description": "null is valid",
"data": null,
"valid": true
"valid": true,
"schema_id": "type_10_0"
},
{
"description": "number is invalid",
"data": 123,
"valid": false
"valid": false,
"schema_id": "type_10_0"
},
{
"description": "string is invalid",
"data": "foo",
"valid": false
"valid": false,
"schema_id": "type_10_0"
}
]
},
@ -569,9 +649,9 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"extensible": true
"extensible": true,
"$id": "type_11_0"
}
]
},
@ -581,7 +661,8 @@
"data": {
"foo": 1
},
"valid": true
"valid": true,
"schema_id": "type_11_0"
}
]
}