From 379c28103488e0e2e464277d729c0a965930c658 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Fri, 25 Oct 2024 15:32:58 +0100 Subject: [PATCH] Remove optional for argument info --- .../ndc-postgres/src/schema/mutation/v2.rs | 88 ++- .../src/translation/mutation/v2/delete.rs | 20 +- .../src/translation/mutation/v2/insert.rs | 14 +- .../src/translation/mutation/v2/update.rs | 28 +- ...schema_tests__schema_test__get_schema.snap | 560 +++++++++++++----- 5 files changed, 468 insertions(+), 242 deletions(-) diff --git a/crates/connectors/ndc-postgres/src/schema/mutation/v2.rs b/crates/connectors/ndc-postgres/src/schema/mutation/v2.rs index c86181cef..c04f8365f 100644 --- a/crates/connectors/ndc-postgres/src/schema/mutation/v2.rs +++ b/crates/connectors/ndc-postgres/src/schema/mutation/v2.rs @@ -30,19 +30,17 @@ pub fn delete_to_procedure( ); } - if let Some(pre_check) = &delete_by_key.pre_check { - arguments.insert( - pre_check.argument_name.clone(), - models::ArgumentInfo { - argument_type: models::Type::Nullable { - underlying_type: Box::new(models::Type::Predicate { - object_type_name: delete_by_key.collection_name.as_str().into(), - }), - }, - description: Some(pre_check.description.clone()), + arguments.insert( + delete_by_key.pre_check.argument_name.clone(), + models::ArgumentInfo { + argument_type: models::Type::Nullable { + underlying_type: Box::new(models::Type::Predicate { + object_type_name: delete_by_key.collection_name.as_str().into(), + }), }, - ); - } + description: Some(delete_by_key.pre_check.description.clone()), + }, + ); make_procedure_type( name.clone(), @@ -79,34 +77,30 @@ pub fn update_to_procedure( } // pre check argument. - if let Some(pre_check) = &update_by_key.pre_check { - arguments.insert( - pre_check.argument_name.clone(), - models::ArgumentInfo { - argument_type: models::Type::Nullable { - underlying_type: Box::new(models::Type::Predicate { - object_type_name: update_by_key.collection_name.as_str().into(), - }), - }, - description: Some(pre_check.description.clone()), + arguments.insert( + update_by_key.pre_check.argument_name.clone(), + models::ArgumentInfo { + argument_type: models::Type::Nullable { + underlying_type: Box::new(models::Type::Predicate { + object_type_name: update_by_key.collection_name.as_str().into(), + }), }, - ); - } + description: Some(update_by_key.pre_check.description.clone()), + }, + ); // post check argument. - if let Some(post_check) = &update_by_key.post_check { - arguments.insert( - post_check.argument_name.clone(), - models::ArgumentInfo { - argument_type: models::Type::Nullable { - underlying_type: Box::new(models::Type::Predicate { - object_type_name: update_by_key.collection_name.as_str().into(), - }), - }, - description: Some(post_check.description.clone()), + arguments.insert( + update_by_key.post_check.argument_name.clone(), + models::ArgumentInfo { + argument_type: models::Type::Nullable { + underlying_type: Box::new(models::Type::Predicate { + object_type_name: update_by_key.collection_name.as_str().into(), + }), }, - ); - } + description: Some(update_by_key.post_check.description.clone()), + }, + ); // update columns argument. // Is of the form update_columns: { : { : }, ... }. @@ -212,19 +206,17 @@ pub fn insert_to_procedure( }, ); - if let Some(post_check) = &insert.post_check { - arguments.insert( - post_check.argument_name.clone(), - models::ArgumentInfo { - argument_type: models::Type::Nullable { - underlying_type: Box::new(models::Type::Predicate { - object_type_name: insert.collection_name.as_str().into(), - }) - }, - description: Some(post_check.description.clone()), + arguments.insert( + insert.post_check.argument_name.clone(), + models::ArgumentInfo { + argument_type: models::Type::Nullable { + underlying_type: Box::new(models::Type::Predicate { + object_type_name: insert.collection_name.as_str().into(), + }), }, - ); - } + description: Some(insert.post_check.description.clone()), + }, + ); make_procedure_type( name.clone(), diff --git a/crates/query-engine/translation/src/translation/mutation/v2/delete.rs b/crates/query-engine/translation/src/translation/mutation/v2/delete.rs index 8b5212d3b..c5b38fec4 100644 --- a/crates/query-engine/translation/src/translation/mutation/v2/delete.rs +++ b/crates/query-engine/translation/src/translation/mutation/v2/delete.rs @@ -30,7 +30,7 @@ pub struct DeleteByKey { pub table_name: sql::ast::TableName, pub by_columns: NonEmpty, pub columns_prefix: String, - pub pre_check: Option, + pub pre_check: CheckArgument, } /// generate a delete for each simple unique constraint on this table @@ -69,12 +69,12 @@ pub fn generate_delete_by_unique( collection_name: collection_name.clone(), by_columns: key_columns, columns_prefix: "key_".to_string(), - pre_check: Some(CheckArgument { + pre_check: CheckArgument { argument_name: "pre_check".into(), description: format!( "Delete permission predicate over the '{collection_name}' collection" ), - }), + }, description, }); @@ -111,10 +111,12 @@ pub fn translate( }; // Build the `UNIQUE_KEY = , ...` boolean expression. - let unique_expressions = mutation.by_columns + let unique_expressions = mutation + .by_columns .iter() .map(|by_column| { - let argument_name = format!("{}{}", mutation.columns_prefix, by_column.name).into(); + let argument_name = + format!("{}{}", mutation.columns_prefix, by_column.name).into(); let unique_key = arguments .get(&argument_name) .ok_or(Error::ArgumentNotFound(argument_name))?; @@ -138,17 +140,15 @@ pub fn translate( // Build the `pre_check` argument boolean expression. let default_constraint = default_constraint(); - let predicate_json = - mutation.pre_check - .as_ref() - .and_then(|pre_check| arguments.get(&pre_check.argument_name)) + let predicate_json = arguments + .get(&mutation.pre_check.argument_name) .unwrap_or(&default_constraint); let predicate: models::Expression = serde_json::from_value(predicate_json.clone()) .map_err(|_| { Error::UnexpectedStructure(format!( "Argument '{}' should have an ndc-spec Expression structure", - mutation.pre_check.as_ref().unwrap().argument_name.clone() + mutation.pre_check.argument_name.clone() )) })?; diff --git a/crates/query-engine/translation/src/translation/mutation/v2/insert.rs b/crates/query-engine/translation/src/translation/mutation/v2/insert.rs index ea04bbeed..9a1196f0e 100644 --- a/crates/query-engine/translation/src/translation/mutation/v2/insert.rs +++ b/crates/query-engine/translation/src/translation/mutation/v2/insert.rs @@ -24,7 +24,7 @@ pub struct InsertMutation { pub table_name: sql::ast::TableName, pub objects_argument_name: models::ArgumentName, pub columns: BTreeMap, - pub post_check: Option, + pub post_check: CheckArgument, } /// generate an insert mutation. @@ -43,12 +43,12 @@ pub fn generate( table_name: sql::ast::TableName(table_info.table_name.clone()), columns: table_info.columns.clone(), objects_argument_name: "objects".into(), - post_check: Some(CheckArgument { + post_check: CheckArgument { argument_name: "post_check".into(), description: format!( "Insert permission predicate over the '{collection_name}' collection" ), - }), + }, }; (name, insert_mutation) @@ -225,17 +225,15 @@ pub fn translate( // Build the `post_check` argument boolean expression. let default_constraint = default_constraint(); - let predicate_json = - mutation.post_check - .as_ref() - .and_then(|post_check| arguments.get(&post_check.argument_name)) + let predicate_json = arguments + .get(&mutation.post_check.argument_name) .unwrap_or(&default_constraint); let predicate: models::Expression = serde_json::from_value(predicate_json.clone()).map_err(|_| { Error::UnexpectedStructure(format!( "Argument '{}' should have an ndc-spec Expression structure", - mutation.post_check.as_ref().unwrap().argument_name.clone() + mutation.post_check.argument_name.clone() )) })?; diff --git a/crates/query-engine/translation/src/translation/mutation/v2/update.rs b/crates/query-engine/translation/src/translation/mutation/v2/update.rs index f3a3beb4c..c25cf6e3e 100644 --- a/crates/query-engine/translation/src/translation/mutation/v2/update.rs +++ b/crates/query-engine/translation/src/translation/mutation/v2/update.rs @@ -32,8 +32,8 @@ pub struct UpdateByKey { pub by_columns: NonEmpty, pub columns_prefix: String, pub update_columns_argument_name: models::ArgumentName, - pub pre_check: Option, - pub post_check: Option, + pub pre_check: CheckArgument, + pub post_check: CheckArgument, pub table_columns: BTreeMap, } @@ -74,18 +74,18 @@ pub fn generate_update_by_unique( by_columns: key_columns, columns_prefix: "key_".to_string(), update_columns_argument_name: "update_columns".into(), - pre_check: Some(CheckArgument { + pre_check: CheckArgument { argument_name: "pre_check".into(), description: format!( "Update permission pre-condition predicate over the '{collection_name}' collection" ), - }), - post_check: Some(CheckArgument { + }, + post_check: CheckArgument { argument_name: "post_check".into(), description: format!( "Update permission post-condition predicate over the '{collection_name}' collection" ), - }), + }, table_columns: table_info.columns.clone(), description, @@ -159,17 +159,15 @@ pub fn translate( let default_constraint = default_constraint(); // Build the `pre_constraint` argument boolean expression. - let pre_predicate_json = - mutation.pre_check - .as_ref() - .and_then(|pre_check| arguments.get(&pre_check.argument_name)) + let pre_predicate_json = arguments + .get(&mutation.pre_check.argument_name) .unwrap_or(&default_constraint); let pre_predicate: models::Expression = serde_json::from_value(pre_predicate_json.clone()).map_err(|_| { Error::UnexpectedStructure(format!( "Argument '{}' should have an ndc-spec Expression structure", - mutation.pre_check.as_ref().unwrap().argument_name.clone() + mutation.pre_check.argument_name.clone() )) })?; @@ -177,17 +175,15 @@ pub fn translate( filtering::translate(env, state, &root_and_current_tables, &pre_predicate)?; // Build the `post_constraint` argument boolean expression. - let post_predicate_json = - mutation.post_check - .as_ref() - .and_then(|post_check| arguments.get(&post_check.argument_name)) + let post_predicate_json = arguments + .get(&mutation.post_check.argument_name) .unwrap_or(&default_constraint); let post_predicate: models::Expression = serde_json::from_value(post_predicate_json.clone()).map_err(|_| { Error::UnexpectedStructure(format!( "Argument '{}' should have an ndc-spec Expression structure", - mutation.post_check.as_ref().unwrap().argument_name.clone() + mutation.post_check.argument_name.clone() )) })?; diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap index dfdcf0787..a4193028e 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap @@ -9891,8 +9891,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Album' collection", "type": { - "type": "predicate", - "object_type_name": "Album" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Album" + } } } }, @@ -9915,8 +9918,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Artist' collection", "type": { - "type": "predicate", - "object_type_name": "Artist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Artist" + } } } }, @@ -9939,8 +9945,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Customer' collection", "type": { - "type": "predicate", - "object_type_name": "Customer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Customer" + } } } }, @@ -9962,8 +9971,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Employee' collection", "type": { - "type": "predicate", - "object_type_name": "Employee" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Employee" + } } } }, @@ -9985,8 +9997,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Genre' collection", "type": { - "type": "predicate", - "object_type_name": "Genre" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Genre" + } } } }, @@ -10008,8 +10023,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'InvoiceLine' collection", "type": { - "type": "predicate", - "object_type_name": "InvoiceLine" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "InvoiceLine" + } } } }, @@ -10031,8 +10049,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Invoice' collection", "type": { - "type": "predicate", - "object_type_name": "Invoice" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Invoice" + } } } }, @@ -10054,8 +10075,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'MediaType' collection", "type": { - "type": "predicate", - "object_type_name": "MediaType" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "MediaType" + } } } }, @@ -10083,8 +10107,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'PlaylistTrack' collection", "type": { - "type": "predicate", - "object_type_name": "PlaylistTrack" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "PlaylistTrack" + } } } }, @@ -10106,8 +10133,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Playlist' collection", "type": { - "type": "predicate", - "object_type_name": "Playlist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Playlist" + } } } }, @@ -10129,8 +10159,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'Track' collection", "type": { - "type": "predicate", - "object_type_name": "Track" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Track" + } } } }, @@ -10152,8 +10185,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'custom_defaults' collection", "type": { - "type": "predicate", - "object_type_name": "custom_defaults" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_defaults" + } } } }, @@ -10175,8 +10211,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'custom_dog' collection", "type": { - "type": "predicate", - "object_type_name": "custom_dog" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_dog" + } } } }, @@ -10198,8 +10237,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'institution_institution' collection", "type": { - "type": "predicate", - "object_type_name": "institution_institution" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "institution_institution" + } } } }, @@ -10221,8 +10263,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'spatial_ref_sys' collection", "type": { - "type": "predicate", - "object_type_name": "spatial_ref_sys" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "spatial_ref_sys" + } } } }, @@ -10256,8 +10301,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } } }, @@ -10285,8 +10333,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } } }, @@ -10308,8 +10359,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } } }, @@ -10331,8 +10385,11 @@ expression: result "pre_check": { "description": "Delete permission predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } } }, @@ -10357,8 +10414,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Album' collection", "type": { - "type": "predicate", - "object_type_name": "Album" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Album" + } } } }, @@ -10383,8 +10443,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Artist' collection", "type": { - "type": "predicate", - "object_type_name": "Artist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Artist" + } } } }, @@ -10409,8 +10472,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Customer' collection", "type": { - "type": "predicate", - "object_type_name": "Customer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Customer" + } } } }, @@ -10435,8 +10501,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Employee' collection", "type": { - "type": "predicate", - "object_type_name": "Employee" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Employee" + } } } }, @@ -10461,8 +10530,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Genre' collection", "type": { - "type": "predicate", - "object_type_name": "Genre" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Genre" + } } } }, @@ -10487,8 +10559,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Invoice' collection", "type": { - "type": "predicate", - "object_type_name": "Invoice" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Invoice" + } } } }, @@ -10513,8 +10588,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'InvoiceLine' collection", "type": { - "type": "predicate", - "object_type_name": "InvoiceLine" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "InvoiceLine" + } } } }, @@ -10539,8 +10617,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'MediaType' collection", "type": { - "type": "predicate", - "object_type_name": "MediaType" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "MediaType" + } } } }, @@ -10565,8 +10646,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Playlist' collection", "type": { - "type": "predicate", - "object_type_name": "Playlist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Playlist" + } } } }, @@ -10591,8 +10675,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'PlaylistTrack' collection", "type": { - "type": "predicate", - "object_type_name": "PlaylistTrack" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "PlaylistTrack" + } } } }, @@ -10617,8 +10704,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'Track' collection", "type": { - "type": "predicate", - "object_type_name": "Track" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Track" + } } } }, @@ -10643,8 +10733,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'custom_defaults' collection", "type": { - "type": "predicate", - "object_type_name": "custom_defaults" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_defaults" + } } } }, @@ -10669,8 +10762,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'custom_dog' collection", "type": { - "type": "predicate", - "object_type_name": "custom_dog" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_dog" + } } } }, @@ -10695,8 +10791,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'custom_test_cidr' collection", "type": { - "type": "predicate", - "object_type_name": "custom_test_cidr" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_test_cidr" + } } } }, @@ -10721,8 +10820,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'deck_of_cards' collection", "type": { - "type": "predicate", - "object_type_name": "deck_of_cards" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "deck_of_cards" + } } } }, @@ -10747,8 +10849,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'discoverable_types_root_occurrence' collection", "type": { - "type": "predicate", - "object_type_name": "discoverable_types_root_occurrence" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "discoverable_types_root_occurrence" + } } } }, @@ -10773,8 +10878,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'even_numbers' collection", "type": { - "type": "predicate", - "object_type_name": "even_numbers" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "even_numbers" + } } } }, @@ -10799,8 +10907,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'group_leader' collection", "type": { - "type": "predicate", - "object_type_name": "group_leader" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "group_leader" + } } } }, @@ -10825,8 +10936,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'institution_institution' collection", "type": { - "type": "predicate", - "object_type_name": "institution_institution" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "institution_institution" + } } } }, @@ -10851,8 +10965,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'phone_numbers' collection", "type": { - "type": "predicate", - "object_type_name": "phone_numbers" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "phone_numbers" + } } } }, @@ -10877,8 +10994,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'spatial_ref_sys' collection", "type": { - "type": "predicate", - "object_type_name": "spatial_ref_sys" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "spatial_ref_sys" + } } } }, @@ -10903,8 +11023,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } } }, @@ -10929,8 +11052,11 @@ expression: result "post_check": { "description": "Insert permission predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } } }, @@ -10953,15 +11079,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Album' collection", "type": { - "type": "predicate", - "object_type_name": "Album" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Album" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Album' collection", "type": { - "type": "predicate", - "object_type_name": "Album" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Album" + } } }, "update_columns": { @@ -10990,15 +11122,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Artist' collection", "type": { - "type": "predicate", - "object_type_name": "Artist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Artist" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Artist' collection", "type": { - "type": "predicate", - "object_type_name": "Artist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Artist" + } } }, "update_columns": { @@ -11027,15 +11165,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Customer' collection", "type": { - "type": "predicate", - "object_type_name": "Customer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Customer" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Customer' collection", "type": { - "type": "predicate", - "object_type_name": "Customer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Customer" + } } }, "update_columns": { @@ -11063,15 +11207,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Employee' collection", "type": { - "type": "predicate", - "object_type_name": "Employee" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Employee" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Employee' collection", "type": { - "type": "predicate", - "object_type_name": "Employee" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Employee" + } } }, "update_columns": { @@ -11099,15 +11249,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Genre' collection", "type": { - "type": "predicate", - "object_type_name": "Genre" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Genre" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Genre' collection", "type": { - "type": "predicate", - "object_type_name": "Genre" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Genre" + } } }, "update_columns": { @@ -11135,15 +11291,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'InvoiceLine' collection", "type": { - "type": "predicate", - "object_type_name": "InvoiceLine" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "InvoiceLine" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'InvoiceLine' collection", "type": { - "type": "predicate", - "object_type_name": "InvoiceLine" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "InvoiceLine" + } } }, "update_columns": { @@ -11171,15 +11333,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Invoice' collection", "type": { - "type": "predicate", - "object_type_name": "Invoice" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Invoice" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Invoice' collection", "type": { - "type": "predicate", - "object_type_name": "Invoice" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Invoice" + } } }, "update_columns": { @@ -11207,15 +11375,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'MediaType' collection", "type": { - "type": "predicate", - "object_type_name": "MediaType" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "MediaType" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'MediaType' collection", "type": { - "type": "predicate", - "object_type_name": "MediaType" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "MediaType" + } } }, "update_columns": { @@ -11249,15 +11423,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'PlaylistTrack' collection", "type": { - "type": "predicate", - "object_type_name": "PlaylistTrack" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "PlaylistTrack" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'PlaylistTrack' collection", "type": { - "type": "predicate", - "object_type_name": "PlaylistTrack" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "PlaylistTrack" + } } }, "update_columns": { @@ -11285,15 +11465,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Playlist' collection", "type": { - "type": "predicate", - "object_type_name": "Playlist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Playlist" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Playlist' collection", "type": { - "type": "predicate", - "object_type_name": "Playlist" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Playlist" + } } }, "update_columns": { @@ -11321,15 +11507,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'Track' collection", "type": { - "type": "predicate", - "object_type_name": "Track" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Track" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'Track' collection", "type": { - "type": "predicate", - "object_type_name": "Track" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "Track" + } } }, "update_columns": { @@ -11357,15 +11549,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'custom_defaults' collection", "type": { - "type": "predicate", - "object_type_name": "custom_defaults" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_defaults" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'custom_defaults' collection", "type": { - "type": "predicate", - "object_type_name": "custom_defaults" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_defaults" + } } }, "update_columns": { @@ -11393,15 +11591,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'custom_dog' collection", "type": { - "type": "predicate", - "object_type_name": "custom_dog" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_dog" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'custom_dog' collection", "type": { - "type": "predicate", - "object_type_name": "custom_dog" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "custom_dog" + } } }, "update_columns": { @@ -11429,15 +11633,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'institution_institution' collection", "type": { - "type": "predicate", - "object_type_name": "institution_institution" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "institution_institution" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'institution_institution' collection", "type": { - "type": "predicate", - "object_type_name": "institution_institution" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "institution_institution" + } } }, "update_columns": { @@ -11465,15 +11675,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'spatial_ref_sys' collection", "type": { - "type": "predicate", - "object_type_name": "spatial_ref_sys" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "spatial_ref_sys" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'spatial_ref_sys' collection", "type": { - "type": "predicate", - "object_type_name": "spatial_ref_sys" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "spatial_ref_sys" + } } }, "update_columns": { @@ -11513,15 +11729,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } }, "update_columns": { @@ -11555,15 +11777,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'topology_layer' collection", "type": { - "type": "predicate", - "object_type_name": "topology_layer" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_layer" + } } }, "update_columns": { @@ -11591,15 +11819,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } }, "update_columns": { @@ -11627,15 +11861,21 @@ expression: result "post_check": { "description": "Update permission post-condition predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } }, "pre_check": { "description": "Update permission pre-condition predicate over the 'topology_topology' collection", "type": { - "type": "predicate", - "object_type_name": "topology_topology" + "type": "nullable", + "underlying_type": { + "type": "predicate", + "object_type_name": "topology_topology" + } } }, "update_columns": {