diff --git a/GEMINI.md b/GEMINI.md index 3d8a9cd..1a894f4 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -111,6 +111,10 @@ Polymorphism is how an object boundary can dynamically take on entirely differen * *Setup*: `{ "family": "widget" }` (Where `widget` is a table type but has no external variations). * *Execution*: The engine queries `db.types.get("widget").variations` and finds only `["widget"]`. Since it lacks table inheritance, it is treated as STI. The engine scans the specific, confined `schemas` array directly under `db.types.get("widget")` for any registered key terminating in the base `.widget` (e.g., `stock.widget`). The `family` automatically uses `kind` as the discriminator. * *Options*: `stock` -> `stock.widget`, `tasks` -> `tasks.widget`. + * **Scenario D: JSONB Bubble Inheritance (Field-Backed)** + * *Setup*: `{ "family": "panel" }` (Where `panel` is NOT a table type, but rather an isolated JSONB boundary defined within another table's `schemas`). + * *Execution*: The engine observes `panel` is not in `db.types` (because it has no physical table). It falls back to scanning the global `db.schemas` registry for any registered key terminating in the base `.panel` (e.g., `balance.panel`, `units.panel`). The `family` automatically uses `kind` as the discriminator. + * *Options*: `balance` -> `balance.panel`, `units` -> `units.panel`. * **`oneOf` (Strict Tagged Unions)**: A hardcoded list of candidate schemas. Unlike `family` which relies on global DB metadata, `oneOf` forces pure mathematical structural evaluation of the provided candidates. It strictly bans typical JSON Schema "Union of Sets" fallback searches. Every candidate MUST possess a mathematically unique discriminator payload to allow $O(1)$ routing. * **Disjoint Types**: `oneOf: [{ "type": "person" }, { "type": "widget" }]`. The engine succeeds because the native `type` acts as a unique discriminator (`"person"` vs `"widget"`). diff --git a/fixtures/polymorphism.json b/fixtures/polymorphism.json index 340f781..f77d933 100644 --- a/fixtures/polymorphism.json +++ b/fixtures/polymorphism.json @@ -1,6 +1,6 @@ [ { - "description": "Vertical family Routing (Across Tables)", + "description": "Vertical family Routing (Scenario A)", "database": { "types": [ { @@ -153,7 +153,7 @@ ] }, { - "description": "Matrix family Routing (Vertical + Horizontal Intersections)", + "description": "Matrix family Routing (Scenario B)", "database": { "types": [ { @@ -284,7 +284,7 @@ ] }, { - "description": "Horizontal family Routing (Virtual Variations)", + "description": "Horizontal family Routing (Scenario C)", "database": { "types": [ { @@ -776,5 +776,123 @@ } } ] + }, + { + "description": "JSONB Field Bubble family Routing (Scenario D)", + "database": { + "types": [ + { + "name": "dashboard", + "variations": [ + "dashboard" + ], + "schemas": { + "dashboard": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + } + }, + "panel": { + "type": "object", + "required": [ + "id", + "kind" + ], + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + } + } + }, + "balance.panel": { + "type": "panel", + "properties": { + "amount": { + "type": "integer" + } + } + }, + "units.panel": { + "type": "panel", + "properties": { + "count": { + "type": "integer" + } + } + } + } + }, + { + "name": "family_panel", + "schemas": { + "family_panel": { + "family": "panel" + } + } + } + ] + }, + "tests": [ + { + "description": "Successfully routes to nested balance panel", + "schema_id": "family_panel", + "data": { + "id": "123", + "kind": "balance", + "amount": 500 + }, + "action": "validate", + "expect": { + "success": true + } + }, + { + "description": "Fails validation on routed schema due to invalid property type", + "schema_id": "family_panel", + "data": { + "id": "123", + "kind": "balance", + "amount": "not_an_int" + }, + "action": "validate", + "expect": { + "success": false, + "errors": [ + { + "code": "INVALID_TYPE", + "details": { + "path": "amount" + } + } + ] + } + }, + { + "description": "Fails when discriminator does not match any bubble schema", + "schema_id": "family_panel", + "data": { + "id": "123", + "kind": "unknown_panel" + }, + "action": "validate", + "expect": { + "success": false, + "errors": [ + { + "code": "NO_FAMILY_MATCH", + "details": { + "path": "" + } + } + ] + } + } + ] } ] \ No newline at end of file diff --git a/src/database/compile/polymorphism.rs b/src/database/compile/polymorphism.rs index 9da88aa..4b0153e 100644 --- a/src/database/compile/polymorphism.rs +++ b/src/database/compile/polymorphism.rs @@ -9,7 +9,7 @@ impl Schema { errors: &mut Vec, ) { let mut options = std::collections::BTreeMap::new(); - let mut strategy = String::new(); + let strategy: &str; if let Some(family) = &self.obj.family { // Formalize the . topology @@ -24,7 +24,7 @@ impl Schema { if let Some(type_def) = db.types.get(&family_base) { if type_def.variations.len() > 1 && type_def.variations.iter().any(|v| v != &family_base) { // Scenario A / B: Table Variations - strategy = "type".to_string(); + strategy = "type"; for var in &type_def.variations { let target_id = if family_prefix.is_empty() { var.to_string() @@ -38,7 +38,7 @@ impl Schema { } } else { // Scenario C: Single Table Inheritance (Horizontal) - strategy = "kind".to_string(); + strategy = "kind"; let suffix = format!(".{}", family_base); @@ -50,6 +50,19 @@ impl Schema { } } } + } else { + // Scenario D: Field-Backed JSONB Bubble STI (No explicit table representation) + strategy = "kind"; + let suffix = format!(".{}", family_base); + + // Scan the entire database schemas registry for matching suffixes + for (id, schema) in &db.schemas { + if id.ends_with(&suffix) || id == &family_base { + if let Some(kind_val) = schema.obj.get_discriminator_value("kind", id) { + options.insert(kind_val, (None, Some(id.to_string()))); + } + } + } } } else if let Some(one_of) = &self.obj.one_of { let mut type_vals = std::collections::HashSet::new(); @@ -84,7 +97,7 @@ impl Schema { } if disjoint_base && structural_types.len() == one_of.len() { - strategy = "".to_string(); + strategy = ""; for (i, c) in one_of.iter().enumerate() { if let Some(crate::database::object::SchemaTypeOrArray::Single(t)) = &c.obj.type_ { if crate::database::object::is_primitive_type(t) { @@ -96,11 +109,11 @@ impl Schema { } } else { strategy = if type_vals.len() > 1 && type_vals.len() == one_of.len() { - "type".to_string() + "type" } else if kind_vals.len() > 1 && kind_vals.len() == one_of.len() { - "kind".to_string() + "kind" } else { - "".to_string() + "" }; if strategy.is_empty() { @@ -148,7 +161,7 @@ impl Schema { if !options.is_empty() { if !strategy.is_empty() { - let _ = self.obj.compiled_discriminator.set(strategy); + let _ = self.obj.compiled_discriminator.set(strategy.to_string()); } let _ = self.obj.compiled_options.set(options); } diff --git a/src/tests/fixtures.rs b/src/tests/fixtures.rs index 316dd12..6b0ea2b 100644 --- a/src/tests/fixtures.rs +++ b/src/tests/fixtures.rs @@ -1619,6 +1619,24 @@ fn test_polymorphism_5_2() { crate::tests::runner::run_test_case(&path, 5, 2).unwrap(); } +#[test] +fn test_polymorphism_6_0() { + let path = format!("{}/fixtures/polymorphism.json", env!("CARGO_MANIFEST_DIR")); + crate::tests::runner::run_test_case(&path, 6, 0).unwrap(); +} + +#[test] +fn test_polymorphism_6_1() { + let path = format!("{}/fixtures/polymorphism.json", env!("CARGO_MANIFEST_DIR")); + crate::tests::runner::run_test_case(&path, 6, 1).unwrap(); +} + +#[test] +fn test_polymorphism_6_2() { + let path = format!("{}/fixtures/polymorphism.json", env!("CARGO_MANIFEST_DIR")); + crate::tests::runner::run_test_case(&path, 6, 2).unwrap(); +} + #[test] fn test_not_0_0() { let path = format!("{}/fixtures/not.json", env!("CARGO_MANIFEST_DIR")); diff --git a/test_out.txt b/test_out.txt deleted file mode 100644 index a8db1b0..0000000 --- a/test_out.txt +++ /dev/null @@ -1,27 +0,0 @@ - Finished `test` profile [unoptimized + debuginfo] target(s) in 0.39s - Running unittests src/lib.rs (target/debug/deps/jspg-d3f18ff3a7e2b386) - -running 1 test -test tests::test_queryer_0_3 ... FAILED - -failures: - ----- tests::test_queryer_0_3 stdout ---- -JSPG_SQL: (SELECT jsonb_strip_nulls((SELECT jsonb_build_object('addresses', (SELECT COALESCE(jsonb_agg(jsonb_build_object('archived', entity_6.archived, 'created_at', entity_6.created_at, 'id', entity_6.id, 'is_primary', contact_4.is_primary, 'target', (SELECT jsonb_build_object('archived', entity_8.archived, 'city', address_7.city, 'created_at', entity_8.created_at, 'id', entity_8.id, 'type', entity_8.type) FROM agreego.address address_7 JOIN agreego.entity entity_8 ON entity_8.id = address_7.id WHERE NOT entity_8.archived AND relationship_5.target_id = entity_8.id), 'type', entity_6.type)), '[]'::jsonb) FROM agreego.contact contact_4 JOIN agreego.relationship relationship_5 ON relationship_5.id = contact_4.id JOIN agreego.entity entity_6 ON entity_6.id = relationship_5.id WHERE NOT entity_6.archived AND relationship_5.target_type = 'address' AND relationship_5.source_id = entity_3.id), 'age', person_1.age, 'archived', entity_3.archived, 'contacts', (SELECT COALESCE(jsonb_agg(jsonb_build_object('archived', entity_11.archived, 'created_at', entity_11.created_at, 'id', entity_11.id, 'is_primary', contact_9.is_primary, 'target', CASE WHEN relationship_10.target_type = 'address' THEN ((SELECT jsonb_build_object('archived', entity_13.archived, 'city', address_12.city, 'created_at', entity_13.created_at, 'id', entity_13.id, 'type', entity_13.type) FROM agreego.address address_12 JOIN agreego.entity entity_13 ON entity_13.id = address_12.id WHERE NOT entity_13.archived AND relationship_10.target_id = entity_13.id)) WHEN relationship_10.target_type = 'email_address' THEN ((SELECT jsonb_build_object('address', email_address_14.address, 'archived', entity_15.archived, 'created_at', entity_15.created_at, 'id', entity_15.id, 'type', entity_15.type) FROM agreego.email_address email_address_14 JOIN agreego.entity entity_15 ON entity_15.id = email_address_14.id WHERE NOT entity_15.archived AND relationship_10.target_id = entity_15.id)) WHEN relationship_10.target_type = 'phone_number' THEN ((SELECT jsonb_build_object('archived', entity_17.archived, 'created_at', entity_17.created_at, 'id', entity_17.id, 'number', phone_number_16.number, 'type', entity_17.type) FROM agreego.phone_number phone_number_16 JOIN agreego.entity entity_17 ON entity_17.id = phone_number_16.id WHERE NOT entity_17.archived AND relationship_10.target_id = entity_17.id)) ELSE NULL END, 'type', entity_11.type)), '[]'::jsonb) FROM agreego.contact contact_9 JOIN agreego.relationship relationship_10 ON relationship_10.id = contact_9.id JOIN agreego.entity entity_11 ON entity_11.id = relationship_10.id WHERE NOT entity_11.archived AND relationship_10.source_id = entity_3.id), 'created_at', entity_3.created_at, 'email_addresses', (SELECT COALESCE(jsonb_agg(jsonb_build_object('archived', entity_20.archived, 'created_at', entity_20.created_at, 'id', entity_20.id, 'is_primary', contact_18.is_primary, 'target', (SELECT jsonb_build_object('address', email_address_21.address, 'archived', entity_22.archived, 'created_at', entity_22.created_at, 'id', entity_22.id, 'type', entity_22.type) FROM agreego.email_address email_address_21 JOIN agreego.entity entity_22 ON entity_22.id = email_address_21.id WHERE NOT entity_22.archived AND relationship_19.target_id = entity_22.id), 'type', entity_20.type)), '[]'::jsonb) FROM agreego.contact contact_18 JOIN agreego.relationship relationship_19 ON relationship_19.id = contact_18.id JOIN agreego.entity entity_20 ON entity_20.id = relationship_19.id WHERE NOT entity_20.archived AND relationship_19.target_type = 'email_address' AND relationship_19.source_id = entity_3.id), 'first_name', person_1.first_name, 'id', entity_3.id, 'last_name', person_1.last_name, 'name', organization_2.name, 'phone_numbers', (SELECT COALESCE(jsonb_agg(jsonb_build_object('archived', entity_25.archived, 'created_at', entity_25.created_at, 'id', entity_25.id, 'is_primary', contact_23.is_primary, 'target', (SELECT jsonb_build_object('archived', entity_27.archived, 'created_at', entity_27.created_at, 'id', entity_27.id, 'number', phone_number_26.number, 'type', entity_27.type) FROM agreego.phone_number phone_number_26 JOIN agreego.entity entity_27 ON entity_27.id = phone_number_26.id WHERE NOT entity_27.archived AND relationship_24.target_id = entity_27.id), 'type', entity_25.type)), '[]'::jsonb) FROM agreego.contact contact_23 JOIN agreego.relationship relationship_24 ON relationship_24.id = contact_23.id JOIN agreego.entity entity_25 ON entity_25.id = relationship_24.id WHERE NOT entity_25.archived AND relationship_24.target_type = 'phone_number' AND relationship_24.source_id = entity_3.id), 'type', entity_3.type) FROM agreego.person person_1 JOIN agreego.organization organization_2 ON organization_2.id = person_1.id JOIN agreego.entity entity_3 ON entity_3.id = organization_2.id WHERE NOT entity_3.archived))) -TEST QUERY ERROR FOR 'Person select on full schema': Line mismatched at execution sequence 1. -Expected Pattern: (SELECT jsonb_strip_nulls((SELECT jsonb_build_object('addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_6.archived,'created_at',entity_6.created_at,'id',entity_6.id,'is_primary',contact_4.is_primary,'target',(SELECT jsonb_build_object('archived',entity_8.archived,'city',address_7.city,'created_at',entity_8.created_at,'id',entity_8.id,'type',entity_8.type)FROM agreego.address address_7 JOIN agreego.entity entity_8 ON entity_8.id=address_7.id WHERE NOT entity_8.archived AND relationship_5.target_id=entity_8.id),'type',entity_6.type)),'[]'::jsonb)FROM agreego.contact contact_4 JOIN agreego.relationship relationship_5 ON relationship_5.id=contact_4.id JOIN agreego.entity entity_6 ON entity_6.id=relationship_5.id WHERE NOT entity_6.archived AND relationship_5.target_type='address'AND relationship_5.source_id=entity_3.id),'age',person_1.age,'archived',entity_3.archived,'contacts',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_11.archived,'created_at',entity_11.created_at,'id',entity_11.id,'is_primary',contact_9.is_primary,'target',CASE WHEN entity_11.target_type='address'THEN((SELECT jsonb_build_object('archived',entity_13.archived,'city',address_12.city,'created_at',entity_13.created_at,'id',entity_13.id,'type',entity_13.type)FROM agreego.address address_12 JOIN agreego.entity entity_13 ON entity_13.id=address_12.id WHERE NOT entity_13.archived AND relationship_10.target_id=entity_13.id))WHEN entity_11.target_type='email_address'THEN((SELECT jsonb_build_object('address',email_address_14.address,'archived',entity_15.archived,'created_at',entity_15.created_at,'id',entity_15.id,'type',entity_15.type)FROM agreego.email_address email_address_14 JOIN agreego.entity entity_15 ON entity_15.id=email_address_14.id WHERE NOT entity_15.archived AND relationship_10.target_id=entity_15.id))WHEN entity_11.target_type='phone_number'THEN((SELECT jsonb_build_object('archived',entity_17.archived,'created_at',entity_17.created_at,'id',entity_17.id,'number',phone_number_16.number,'type',entity_17.type)FROM agreego.phone_number phone_number_16 JOIN agreego.entity entity_17 ON entity_17.id=phone_number_16.id WHERE NOT entity_17.archived AND relationship_10.target_id=entity_17.id))ELSE NULL END,'type',entity_11.type)),'[]'::jsonb)FROM agreego.contact contact_9 JOIN agreego.relationship relationship_10 ON relationship_10.id=contact_9.id JOIN agreego.entity entity_11 ON entity_11.id=relationship_10.id WHERE NOT entity_11.archived AND relationship_10.source_id=entity_3.id),'created_at',entity_3.created_at,'email_addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_20.archived,'created_at',entity_20.created_at,'id',entity_20.id,'is_primary',contact_18.is_primary,'target',(SELECT jsonb_build_object('address',email_address_21.address,'archived',entity_22.archived,'created_at',entity_22.created_at,'id',entity_22.id,'type',entity_22.type)FROM agreego.email_address email_address_21 JOIN agreego.entity entity_22 ON entity_22.id=email_address_21.id WHERE NOT entity_22.archived AND relationship_19.target_id=entity_22.id),'type',entity_20.type)),'[]'::jsonb)FROM agreego.contact contact_18 JOIN agreego.relationship relationship_19 ON relationship_19.id=contact_18.id JOIN agreego.entity entity_20 ON entity_20.id=relationship_19.id WHERE NOT entity_20.archived AND relationship_19.target_type='email_address'AND relationship_19.source_id=entity_3.id),'first_name',person_1.first_name,'id',entity_3.id,'last_name',person_1.last_name,'name',organization_2.name,'phone_numbers',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_25.archived,'created_at',entity_25.created_at,'id',entity_25.id,'is_primary',contact_23.is_primary,'target',(SELECT jsonb_build_object('archived',entity_27.archived,'created_at',entity_27.created_at,'id',entity_27.id,'number',phone_number_26.number,'type',entity_27.type)FROM agreego.phone_number phone_number_26 JOIN agreego.entity entity_27 ON entity_27.id=phone_number_26.id WHERE NOT entity_27.archived AND relationship_24.target_id=entity_27.id),'type',entity_25.type)),'[]'::jsonb)FROM agreego.contact contact_23 JOIN agreego.relationship relationship_24 ON relationship_24.id=contact_23.id JOIN agreego.entity entity_25 ON entity_25.id=relationship_24.id WHERE NOT entity_25.archived AND relationship_24.target_type='phone_number'AND relationship_24.source_id=entity_3.id),'type',entity_3.type)FROM agreego.person person_1 JOIN agreego.organization organization_2 ON organization_2.id=person_1.id JOIN agreego.entity entity_3 ON entity_3.id=organization_2.id WHERE NOT entity_3.archived))) -Actual SQL: (SELECT jsonb_strip_nulls((SELECT jsonb_build_object('addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_6.archived,'created_at',entity_6.created_at,'id',entity_6.id,'is_primary',contact_4.is_primary,'target',(SELECT jsonb_build_object('archived',entity_8.archived,'city',address_7.city,'created_at',entity_8.created_at,'id',entity_8.id,'type',entity_8.type)FROM agreego.address address_7 JOIN agreego.entity entity_8 ON entity_8.id=address_7.id WHERE NOT entity_8.archived AND relationship_5.target_id=entity_8.id),'type',entity_6.type)),'[]'::jsonb)FROM agreego.contact contact_4 JOIN agreego.relationship relationship_5 ON relationship_5.id=contact_4.id JOIN agreego.entity entity_6 ON entity_6.id=relationship_5.id WHERE NOT entity_6.archived AND relationship_5.target_type='address'AND relationship_5.source_id=entity_3.id),'age',person_1.age,'archived',entity_3.archived,'contacts',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_11.archived,'created_at',entity_11.created_at,'id',entity_11.id,'is_primary',contact_9.is_primary,'target',CASE WHEN relationship_10.target_type='address'THEN((SELECT jsonb_build_object('archived',entity_13.archived,'city',address_12.city,'created_at',entity_13.created_at,'id',entity_13.id,'type',entity_13.type)FROM agreego.address address_12 JOIN agreego.entity entity_13 ON entity_13.id=address_12.id WHERE NOT entity_13.archived AND relationship_10.target_id=entity_13.id))WHEN relationship_10.target_type='email_address'THEN((SELECT jsonb_build_object('address',email_address_14.address,'archived',entity_15.archived,'created_at',entity_15.created_at,'id',entity_15.id,'type',entity_15.type)FROM agreego.email_address email_address_14 JOIN agreego.entity entity_15 ON entity_15.id=email_address_14.id WHERE NOT entity_15.archived AND relationship_10.target_id=entity_15.id))WHEN relationship_10.target_type='phone_number'THEN((SELECT jsonb_build_object('archived',entity_17.archived,'created_at',entity_17.created_at,'id',entity_17.id,'number',phone_number_16.number,'type',entity_17.type)FROM agreego.phone_number phone_number_16 JOIN agreego.entity entity_17 ON entity_17.id=phone_number_16.id WHERE NOT entity_17.archived AND relationship_10.target_id=entity_17.id))ELSE NULL END,'type',entity_11.type)),'[]'::jsonb)FROM agreego.contact contact_9 JOIN agreego.relationship relationship_10 ON relationship_10.id=contact_9.id JOIN agreego.entity entity_11 ON entity_11.id=relationship_10.id WHERE NOT entity_11.archived AND relationship_10.source_id=entity_3.id),'created_at',entity_3.created_at,'email_addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_20.archived,'created_at',entity_20.created_at,'id',entity_20.id,'is_primary',contact_18.is_primary,'target',(SELECT jsonb_build_object('address',email_address_21.address,'archived',entity_22.archived,'created_at',entity_22.created_at,'id',entity_22.id,'type',entity_22.type)FROM agreego.email_address email_address_21 JOIN agreego.entity entity_22 ON entity_22.id=email_address_21.id WHERE NOT entity_22.archived AND relationship_19.target_id=entity_22.id),'type',entity_20.type)),'[]'::jsonb)FROM agreego.contact contact_18 JOIN agreego.relationship relationship_19 ON relationship_19.id=contact_18.id JOIN agreego.entity entity_20 ON entity_20.id=relationship_19.id WHERE NOT entity_20.archived AND relationship_19.target_type='email_address'AND relationship_19.source_id=entity_3.id),'first_name',person_1.first_name,'id',entity_3.id,'last_name',person_1.last_name,'name',organization_2.name,'phone_numbers',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_25.archived,'created_at',entity_25.created_at,'id',entity_25.id,'is_primary',contact_23.is_primary,'target',(SELECT jsonb_build_object('archived',entity_27.archived,'created_at',entity_27.created_at,'id',entity_27.id,'number',phone_number_26.number,'type',entity_27.type)FROM agreego.phone_number phone_number_26 JOIN agreego.entity entity_27 ON entity_27.id=phone_number_26.id WHERE NOT entity_27.archived AND relationship_24.target_id=entity_27.id),'type',entity_25.type)),'[]'::jsonb)FROM agreego.contact contact_23 JOIN agreego.relationship relationship_24 ON relationship_24.id=contact_23.id JOIN agreego.entity entity_25 ON entity_25.id=relationship_24.id WHERE NOT entity_25.archived AND relationship_24.target_type='phone_number'AND relationship_24.source_id=entity_3.id),'type',entity_3.type)FROM agreego.person person_1 JOIN agreego.organization organization_2 ON organization_2.id=person_1.id JOIN agreego.entity entity_3 ON entity_3.id=organization_2.id WHERE NOT entity_3.archived))) -Regex used: \(SELECT jsonb_strip_nulls\(\(SELECT jsonb_build_object\('addresses',\(SELECT COALESCE\(jsonb_agg\(jsonb_build_object\('archived',entity_6\.archived,'created_at',entity_6\.created_at,'id',entity_6\.id,'is_primary',contact_4\.is_primary,'target',\(SELECT jsonb_build_object\('archived',entity_8\.archived,'city',address_7\.city,'created_at',entity_8\.created_at,'id',entity_8\.id,'type',entity_8\.type\)FROM agreego\.address address_7 JOIN agreego\.entity entity_8 ON entity_8\.id=address_7\.id WHERE NOT entity_8\.archived AND relationship_5\.target_id=entity_8\.id\),'type',entity_6\.type\)\),'\[\]'::jsonb\)FROM agreego\.contact contact_4 JOIN agreego\.relationship relationship_5 ON relationship_5\.id=contact_4\.id JOIN agreego\.entity entity_6 ON entity_6\.id=relationship_5\.id WHERE NOT entity_6\.archived AND relationship_5\.target_type='address'AND relationship_5\.source_id=entity_3\.id\),'age',person_1\.age,'archived',entity_3\.archived,'contacts',\(SELECT COALESCE\(jsonb_agg\(jsonb_build_object\('archived',entity_11\.archived,'created_at',entity_11\.created_at,'id',entity_11\.id,'is_primary',contact_9\.is_primary,'target',CASE WHEN entity_11\.target_type='address'THEN\(\(SELECT jsonb_build_object\('archived',entity_13\.archived,'city',address_12\.city,'created_at',entity_13\.created_at,'id',entity_13\.id,'type',entity_13\.type\)FROM agreego\.address address_12 JOIN agreego\.entity entity_13 ON entity_13\.id=address_12\.id WHERE NOT entity_13\.archived AND relationship_10\.target_id=entity_13\.id\)\)WHEN entity_11\.target_type='email_address'THEN\(\(SELECT jsonb_build_object\('address',email_address_14\.address,'archived',entity_15\.archived,'created_at',entity_15\.created_at,'id',entity_15\.id,'type',entity_15\.type\)FROM agreego\.email_address email_address_14 JOIN agreego\.entity entity_15 ON entity_15\.id=email_address_14\.id WHERE NOT entity_15\.archived AND relationship_10\.target_id=entity_15\.id\)\)WHEN entity_11\.target_type='phone_number'THEN\(\(SELECT jsonb_build_object\('archived',entity_17\.archived,'created_at',entity_17\.created_at,'id',entity_17\.id,'number',phone_number_16\.number,'type',entity_17\.type\)FROM agreego\.phone_number phone_number_16 JOIN agreego\.entity entity_17 ON entity_17\.id=phone_number_16\.id WHERE NOT entity_17\.archived AND relationship_10\.target_id=entity_17\.id\)\)ELSE NULL END,'type',entity_11\.type\)\),'\[\]'::jsonb\)FROM agreego\.contact contact_9 JOIN agreego\.relationship relationship_10 ON relationship_10\.id=contact_9\.id JOIN agreego\.entity entity_11 ON entity_11\.id=relationship_10\.id WHERE NOT entity_11\.archived AND relationship_10\.source_id=entity_3\.id\),'created_at',entity_3\.created_at,'email_addresses',\(SELECT COALESCE\(jsonb_agg\(jsonb_build_object\('archived',entity_20\.archived,'created_at',entity_20\.created_at,'id',entity_20\.id,'is_primary',contact_18\.is_primary,'target',\(SELECT jsonb_build_object\('address',email_address_21\.address,'archived',entity_22\.archived,'created_at',entity_22\.created_at,'id',entity_22\.id,'type',entity_22\.type\)FROM agreego\.email_address email_address_21 JOIN agreego\.entity entity_22 ON entity_22\.id=email_address_21\.id WHERE NOT entity_22\.archived AND relationship_19\.target_id=entity_22\.id\),'type',entity_20\.type\)\),'\[\]'::jsonb\)FROM agreego\.contact contact_18 JOIN agreego\.relationship relationship_19 ON relationship_19\.id=contact_18\.id JOIN agreego\.entity entity_20 ON entity_20\.id=relationship_19\.id WHERE NOT entity_20\.archived AND relationship_19\.target_type='email_address'AND relationship_19\.source_id=entity_3\.id\),'first_name',person_1\.first_name,'id',entity_3\.id,'last_name',person_1\.last_name,'name',organization_2\.name,'phone_numbers',\(SELECT COALESCE\(jsonb_agg\(jsonb_build_object\('archived',entity_25\.archived,'created_at',entity_25\.created_at,'id',entity_25\.id,'is_primary',contact_23\.is_primary,'target',\(SELECT jsonb_build_object\('archived',entity_27\.archived,'created_at',entity_27\.created_at,'id',entity_27\.id,'number',phone_number_26\.number,'type',entity_27\.type\)FROM agreego\.phone_number phone_number_26 JOIN agreego\.entity entity_27 ON entity_27\.id=phone_number_26\.id WHERE NOT entity_27\.archived AND relationship_24\.target_id=entity_27\.id\),'type',entity_25\.type\)\),'\[\]'::jsonb\)FROM agreego\.contact contact_23 JOIN agreego\.relationship relationship_24 ON relationship_24\.id=contact_23\.id JOIN agreego\.entity entity_25 ON entity_25\.id=relationship_24\.id WHERE NOT entity_25\.archived AND relationship_24\.target_type='phone_number'AND relationship_24\.source_id=entity_3\.id\),'type',entity_3\.type\)FROM agreego\.person person_1 JOIN agreego\.organization organization_2 ON organization_2\.id=person_1\.id JOIN agreego\.entity entity_3 ON entity_3\.id=organization_2\.id WHERE NOT entity_3\.archived\)\)\) -Variables Mapped: {} - -thread 'tests::test_queryer_0_3' (124127284) panicked at src/tests/fixtures.rs:1433:54: -called `Result::unwrap()` on an `Err` value: "[Queryer Execution] Query Test 'Person select on full schema' failed. Error: Line mismatched at execution sequence 1.\nExpected Pattern: (SELECT jsonb_strip_nulls((SELECT jsonb_build_object('addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_6.archived,'created_at',entity_6.created_at,'id',entity_6.id,'is_primary',contact_4.is_primary,'target',(SELECT jsonb_build_object('archived',entity_8.archived,'city',address_7.city,'created_at',entity_8.created_at,'id',entity_8.id,'type',entity_8.type)FROM agreego.address address_7 JOIN agreego.entity entity_8 ON entity_8.id=address_7.id WHERE NOT entity_8.archived AND relationship_5.target_id=entity_8.id),'type',entity_6.type)),'[]'::jsonb)FROM agreego.contact contact_4 JOIN agreego.relationship relationship_5 ON relationship_5.id=contact_4.id JOIN agreego.entity entity_6 ON entity_6.id=relationship_5.id WHERE NOT entity_6.archived AND relationship_5.target_type='address'AND relationship_5.source_id=entity_3.id),'age',person_1.age,'archived',entity_3.archived,'contacts',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_11.archived,'created_at',entity_11.created_at,'id',entity_11.id,'is_primary',contact_9.is_primary,'target',CASE WHEN entity_11.target_type='address'THEN((SELECT jsonb_build_object('archived',entity_13.archived,'city',address_12.city,'created_at',entity_13.created_at,'id',entity_13.id,'type',entity_13.type)FROM agreego.address address_12 JOIN agreego.entity entity_13 ON entity_13.id=address_12.id WHERE NOT entity_13.archived AND relationship_10.target_id=entity_13.id))WHEN entity_11.target_type='email_address'THEN((SELECT jsonb_build_object('address',email_address_14.address,'archived',entity_15.archived,'created_at',entity_15.created_at,'id',entity_15.id,'type',entity_15.type)FROM agreego.email_address email_address_14 JOIN agreego.entity entity_15 ON entity_15.id=email_address_14.id WHERE NOT entity_15.archived AND relationship_10.target_id=entity_15.id))WHEN entity_11.target_type='phone_number'THEN((SELECT jsonb_build_object('archived',entity_17.archived,'created_at',entity_17.created_at,'id',entity_17.id,'number',phone_number_16.number,'type',entity_17.type)FROM agreego.phone_number phone_number_16 JOIN agreego.entity entity_17 ON entity_17.id=phone_number_16.id WHERE NOT entity_17.archived AND relationship_10.target_id=entity_17.id))ELSE NULL END,'type',entity_11.type)),'[]'::jsonb)FROM agreego.contact contact_9 JOIN agreego.relationship relationship_10 ON relationship_10.id=contact_9.id JOIN agreego.entity entity_11 ON entity_11.id=relationship_10.id WHERE NOT entity_11.archived AND relationship_10.source_id=entity_3.id),'created_at',entity_3.created_at,'email_addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_20.archived,'created_at',entity_20.created_at,'id',entity_20.id,'is_primary',contact_18.is_primary,'target',(SELECT jsonb_build_object('address',email_address_21.address,'archived',entity_22.archived,'created_at',entity_22.created_at,'id',entity_22.id,'type',entity_22.type)FROM agreego.email_address email_address_21 JOIN agreego.entity entity_22 ON entity_22.id=email_address_21.id WHERE NOT entity_22.archived AND relationship_19.target_id=entity_22.id),'type',entity_20.type)),'[]'::jsonb)FROM agreego.contact contact_18 JOIN agreego.relationship relationship_19 ON relationship_19.id=contact_18.id JOIN agreego.entity entity_20 ON entity_20.id=relationship_19.id WHERE NOT entity_20.archived AND relationship_19.target_type='email_address'AND relationship_19.source_id=entity_3.id),'first_name',person_1.first_name,'id',entity_3.id,'last_name',person_1.last_name,'name',organization_2.name,'phone_numbers',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_25.archived,'created_at',entity_25.created_at,'id',entity_25.id,'is_primary',contact_23.is_primary,'target',(SELECT jsonb_build_object('archived',entity_27.archived,'created_at',entity_27.created_at,'id',entity_27.id,'number',phone_number_26.number,'type',entity_27.type)FROM agreego.phone_number phone_number_26 JOIN agreego.entity entity_27 ON entity_27.id=phone_number_26.id WHERE NOT entity_27.archived AND relationship_24.target_id=entity_27.id),'type',entity_25.type)),'[]'::jsonb)FROM agreego.contact contact_23 JOIN agreego.relationship relationship_24 ON relationship_24.id=contact_23.id JOIN agreego.entity entity_25 ON entity_25.id=relationship_24.id WHERE NOT entity_25.archived AND relationship_24.target_type='phone_number'AND relationship_24.source_id=entity_3.id),'type',entity_3.type)FROM agreego.person person_1 JOIN agreego.organization organization_2 ON organization_2.id=person_1.id JOIN agreego.entity entity_3 ON entity_3.id=organization_2.id WHERE NOT entity_3.archived)))\nActual SQL: (SELECT jsonb_strip_nulls((SELECT jsonb_build_object('addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_6.archived,'created_at',entity_6.created_at,'id',entity_6.id,'is_primary',contact_4.is_primary,'target',(SELECT jsonb_build_object('archived',entity_8.archived,'city',address_7.city,'created_at',entity_8.created_at,'id',entity_8.id,'type',entity_8.type)FROM agreego.address address_7 JOIN agreego.entity entity_8 ON entity_8.id=address_7.id WHERE NOT entity_8.archived AND relationship_5.target_id=entity_8.id),'type',entity_6.type)),'[]'::jsonb)FROM agreego.contact contact_4 JOIN agreego.relationship relationship_5 ON relationship_5.id=contact_4.id JOIN agreego.entity entity_6 ON entity_6.id=relationship_5.id WHERE NOT entity_6.archived AND relationship_5.target_type='address'AND relationship_5.source_id=entity_3.id),'age',person_1.age,'archived',entity_3.archived,'contacts',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_11.archived,'created_at',entity_11.created_at,'id',entity_11.id,'is_primary',contact_9.is_primary,'target',CASE WHEN relationship_10.target_type='address'THEN((SELECT jsonb_build_object('archived',entity_13.archived,'city',address_12.city,'created_at',entity_13.created_at,'id',entity_13.id,'type',entity_13.type)FROM agreego.address address_12 JOIN agreego.entity entity_13 ON entity_13.id=address_12.id WHERE NOT entity_13.archived AND relationship_10.target_id=entity_13.id))WHEN relationship_10.target_type='email_address'THEN((SELECT jsonb_build_object('address',email_address_14.address,'archived',entity_15.archived,'created_at',entity_15.created_at,'id',entity_15.id,'type',entity_15.type)FROM agreego.email_address email_address_14 JOIN agreego.entity entity_15 ON entity_15.id=email_address_14.id WHERE NOT entity_15.archived AND relationship_10.target_id=entity_15.id))WHEN relationship_10.target_type='phone_number'THEN((SELECT jsonb_build_object('archived',entity_17.archived,'created_at',entity_17.created_at,'id',entity_17.id,'number',phone_number_16.number,'type',entity_17.type)FROM agreego.phone_number phone_number_16 JOIN agreego.entity entity_17 ON entity_17.id=phone_number_16.id WHERE NOT entity_17.archived AND relationship_10.target_id=entity_17.id))ELSE NULL END,'type',entity_11.type)),'[]'::jsonb)FROM agreego.contact contact_9 JOIN agreego.relationship relationship_10 ON relationship_10.id=contact_9.id JOIN agreego.entity entity_11 ON entity_11.id=relationship_10.id WHERE NOT entity_11.archived AND relationship_10.source_id=entity_3.id),'created_at',entity_3.created_at,'email_addresses',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_20.archived,'created_at',entity_20.created_at,'id',entity_20.id,'is_primary',contact_18.is_primary,'target',(SELECT jsonb_build_object('address',email_address_21.address,'archived',entity_22.archived,'created_at',entity_22.created_at,'id',entity_22.id,'type',entity_22.type)FROM agreego.email_address email_address_21 JOIN agreego.entity entity_22 ON entity_22.id=email_address_21.id WHERE NOT entity_22.archived AND relationship_19.target_id=entity_22.id),'type',entity_20.type)),'[]'::jsonb)FROM agreego.contact contact_18 JOIN agreego.relationship relationship_19 ON relationship_19.id=contact_18.id JOIN agreego.entity entity_20 ON entity_20.id=relationship_19.id WHERE NOT entity_20.archived AND relationship_19.target_type='email_address'AND relationship_19.source_id=entity_3.id),'first_name',person_1.first_name,'id',entity_3.id,'last_name',person_1.last_name,'name',organization_2.name,'phone_numbers',(SELECT COALESCE(jsonb_agg(jsonb_build_object('archived',entity_25.archived,'created_at',entity_25.created_at,'id',entity_25.id,'is_primary',contact_23.is_primary,'target',(SELECT jsonb_build_object('archived',entity_27.archived,'created_at',entity_27.created_at,'id',entity_27.id,'number',phone_number_26.number,'type',entity_27.type)FROM agreego.phone_number phone_number_26 JOIN agreego.entity entity_27 ON entity_27.id=phone_number_26.id WHERE NOT entity_27.archived AND relationship_24.target_id=entity_27.id),'type',entity_25.type)),'[]'::jsonb)FROM agreego.contact contact_23 JOIN agreego.relationship relationship_24 ON relationship_24.id=contact_23.id JOIN agreego.entity entity_25 ON entity_25.id=relationship_24.id WHERE NOT entity_25.archived AND relationship_24.target_type='phone_number'AND relationship_24.source_id=entity_3.id),'type',entity_3.type)FROM agreego.person person_1 JOIN agreego.organization organization_2 ON organization_2.id=person_1.id JOIN agreego.entity entity_3 ON entity_3.id=organization_2.id WHERE NOT entity_3.archived)))\nRegex used: \\(SELECT jsonb_strip_nulls\\(\\(SELECT jsonb_build_object\\('addresses',\\(SELECT COALESCE\\(jsonb_agg\\(jsonb_build_object\\('archived',entity_6\\.archived,'created_at',entity_6\\.created_at,'id',entity_6\\.id,'is_primary',contact_4\\.is_primary,'target',\\(SELECT jsonb_build_object\\('archived',entity_8\\.archived,'city',address_7\\.city,'created_at',entity_8\\.created_at,'id',entity_8\\.id,'type',entity_8\\.type\\)FROM agreego\\.address address_7 JOIN agreego\\.entity entity_8 ON entity_8\\.id=address_7\\.id WHERE NOT entity_8\\.archived AND relationship_5\\.target_id=entity_8\\.id\\),'type',entity_6\\.type\\)\\),'\\[\\]'::jsonb\\)FROM agreego\\.contact contact_4 JOIN agreego\\.relationship relationship_5 ON relationship_5\\.id=contact_4\\.id JOIN agreego\\.entity entity_6 ON entity_6\\.id=relationship_5\\.id WHERE NOT entity_6\\.archived AND relationship_5\\.target_type='address'AND relationship_5\\.source_id=entity_3\\.id\\),'age',person_1\\.age,'archived',entity_3\\.archived,'contacts',\\(SELECT COALESCE\\(jsonb_agg\\(jsonb_build_object\\('archived',entity_11\\.archived,'created_at',entity_11\\.created_at,'id',entity_11\\.id,'is_primary',contact_9\\.is_primary,'target',CASE WHEN entity_11\\.target_type='address'THEN\\(\\(SELECT jsonb_build_object\\('archived',entity_13\\.archived,'city',address_12\\.city,'created_at',entity_13\\.created_at,'id',entity_13\\.id,'type',entity_13\\.type\\)FROM agreego\\.address address_12 JOIN agreego\\.entity entity_13 ON entity_13\\.id=address_12\\.id WHERE NOT entity_13\\.archived AND relationship_10\\.target_id=entity_13\\.id\\)\\)WHEN entity_11\\.target_type='email_address'THEN\\(\\(SELECT jsonb_build_object\\('address',email_address_14\\.address,'archived',entity_15\\.archived,'created_at',entity_15\\.created_at,'id',entity_15\\.id,'type',entity_15\\.type\\)FROM agreego\\.email_address email_address_14 JOIN agreego\\.entity entity_15 ON entity_15\\.id=email_address_14\\.id WHERE NOT entity_15\\.archived AND relationship_10\\.target_id=entity_15\\.id\\)\\)WHEN entity_11\\.target_type='phone_number'THEN\\(\\(SELECT jsonb_build_object\\('archived',entity_17\\.archived,'created_at',entity_17\\.created_at,'id',entity_17\\.id,'number',phone_number_16\\.number,'type',entity_17\\.type\\)FROM agreego\\.phone_number phone_number_16 JOIN agreego\\.entity entity_17 ON entity_17\\.id=phone_number_16\\.id WHERE NOT entity_17\\.archived AND relationship_10\\.target_id=entity_17\\.id\\)\\)ELSE NULL END,'type',entity_11\\.type\\)\\),'\\[\\]'::jsonb\\)FROM agreego\\.contact contact_9 JOIN agreego\\.relationship relationship_10 ON relationship_10\\.id=contact_9\\.id JOIN agreego\\.entity entity_11 ON entity_11\\.id=relationship_10\\.id WHERE NOT entity_11\\.archived AND relationship_10\\.source_id=entity_3\\.id\\),'created_at',entity_3\\.created_at,'email_addresses',\\(SELECT COALESCE\\(jsonb_agg\\(jsonb_build_object\\('archived',entity_20\\.archived,'created_at',entity_20\\.created_at,'id',entity_20\\.id,'is_primary',contact_18\\.is_primary,'target',\\(SELECT jsonb_build_object\\('address',email_address_21\\.address,'archived',entity_22\\.archived,'created_at',entity_22\\.created_at,'id',entity_22\\.id,'type',entity_22\\.type\\)FROM agreego\\.email_address email_address_21 JOIN agreego\\.entity entity_22 ON entity_22\\.id=email_address_21\\.id WHERE NOT entity_22\\.archived AND relationship_19\\.target_id=entity_22\\.id\\),'type',entity_20\\.type\\)\\),'\\[\\]'::jsonb\\)FROM agreego\\.contact contact_18 JOIN agreego\\.relationship relationship_19 ON relationship_19\\.id=contact_18\\.id JOIN agreego\\.entity entity_20 ON entity_20\\.id=relationship_19\\.id WHERE NOT entity_20\\.archived AND relationship_19\\.target_type='email_address'AND relationship_19\\.source_id=entity_3\\.id\\),'first_name',person_1\\.first_name,'id',entity_3\\.id,'last_name',person_1\\.last_name,'name',organization_2\\.name,'phone_numbers',\\(SELECT COALESCE\\(jsonb_agg\\(jsonb_build_object\\('archived',entity_25\\.archived,'created_at',entity_25\\.created_at,'id',entity_25\\.id,'is_primary',contact_23\\.is_primary,'target',\\(SELECT jsonb_build_object\\('archived',entity_27\\.archived,'created_at',entity_27\\.created_at,'id',entity_27\\.id,'number',phone_number_26\\.number,'type',entity_27\\.type\\)FROM agreego\\.phone_number phone_number_26 JOIN agreego\\.entity entity_27 ON entity_27\\.id=phone_number_26\\.id WHERE NOT entity_27\\.archived AND relationship_24\\.target_id=entity_27\\.id\\),'type',entity_25\\.type\\)\\),'\\[\\]'::jsonb\\)FROM agreego\\.contact contact_23 JOIN agreego\\.relationship relationship_24 ON relationship_24\\.id=contact_23\\.id JOIN agreego\\.entity entity_25 ON entity_25\\.id=relationship_24\\.id WHERE NOT entity_25\\.archived AND relationship_24\\.target_type='phone_number'AND relationship_24\\.source_id=entity_3\\.id\\),'type',entity_3\\.type\\)FROM agreego\\.person person_1 JOIN agreego\\.organization organization_2 ON organization_2\\.id=person_1\\.id JOIN agreego\\.entity entity_3 ON entity_3\\.id=organization_2\\.id WHERE NOT entity_3\\.archived\\)\\)\\)\nVariables Mapped: {}" -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - - -failures: - tests::test_queryer_0_3 - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1362 filtered out; finished in 0.01s - -error: test failed, to rerun pass `--lib` diff --git a/test_output.txt b/test_output.txt deleted file mode 100644 index 2fe69e5..0000000 --- a/test_output.txt +++ /dev/null @@ -1,109 +0,0 @@ - Finished `test` profile [unoptimized + debuginfo] target(s) in 0.43s - Running unittests src/lib.rs (target/debug/deps/jspg-d3f18ff3a7e2b386) - -running 1 test -test tests::test_filter_0_0 ... FAILED - -failures: - ----- tests::test_filter_0_0 stdout ---- -TEST COMPILE ERROR FOR 'Assert filter generation map accurately represents strongly typed conditions natively.': Detailed Schema Match Failure for 'gender.condition'! - -Expected: -{ - "compiledPropertyNames": [ - "$eq", - "$ne", - "$nof", - "$of" - ], - "properties": { - "$eq": { - "type": [ - "gender", - "null" - ] - }, - "$ne": { - "type": [ - "gender", - "null" - ] - }, - "$nof": { - "items": { - "type": "gender" - }, - "type": [ - "array", - "null" - ] - }, - "$of": { - "items": { - "type": "gender" - }, - "type": [ - "array", - "null" - ] - } - }, - "type": "object" -} - -Actual: -{ - "compiledPropertyNames": [ - "$eq", - "$ne", - "$nof", - "$of", - "kind" - ], - "properties": { - "$eq": { - "type": [ - "gender", - "null" - ] - }, - "$ne": { - "type": [ - "gender", - "null" - ] - }, - "$nof": { - "items": { - "type": "gender" - }, - "type": [ - "array", - "null" - ] - }, - "$of": { - "items": { - "type": "gender" - }, - "type": [ - "array", - "null" - ] - } - }, - "type": "condition" -} - -thread 'tests::test_filter_0_0' (118346550) panicked at src/tests/fixtures.rs:539:54: -called `Result::unwrap()` on an `Err` value: "[Filter Synthesis Object-Oriented Composition] Compile Test 'Assert filter generation map accurately represents strongly typed conditions natively.' failed. Error: Detailed Schema Match Failure for 'gender.condition'!\n\nExpected:\n{\n \"compiledPropertyNames\": [\n \"$eq\",\n \"$ne\",\n \"$nof\",\n \"$of\"\n ],\n \"properties\": {\n \"$eq\": {\n \"type\": [\n \"gender\",\n \"null\"\n ]\n },\n \"$ne\": {\n \"type\": [\n \"gender\",\n \"null\"\n ]\n },\n \"$nof\": {\n \"items\": {\n \"type\": \"gender\"\n },\n \"type\": [\n \"array\",\n \"null\"\n ]\n },\n \"$of\": {\n \"items\": {\n \"type\": \"gender\"\n },\n \"type\": [\n \"array\",\n \"null\"\n ]\n }\n },\n \"type\": \"object\"\n}\n\nActual:\n{\n \"compiledPropertyNames\": [\n \"$eq\",\n \"$ne\",\n \"$nof\",\n \"$of\",\n \"kind\"\n ],\n \"properties\": {\n \"$eq\": {\n \"type\": [\n \"gender\",\n \"null\"\n ]\n },\n \"$ne\": {\n \"type\": [\n \"gender\",\n \"null\"\n ]\n },\n \"$nof\": {\n \"items\": {\n \"type\": \"gender\"\n },\n \"type\": [\n \"array\",\n \"null\"\n ]\n },\n \"$of\": {\n \"items\": {\n \"type\": \"gender\"\n },\n \"type\": [\n \"array\",\n \"null\"\n ]\n }\n },\n \"type\": \"condition\"\n}" -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - - -failures: - tests::test_filter_0_0 - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1362 filtered out; finished in 0.00s - -error: test failed, to rerun pass `--lib`