| 73 | } |
| 74 | |
| 75 | pub async fn complex(executor: &mut impl Executor) { |
| 76 | let _lock = MUTEX.lock().await; |
| 77 | |
| 78 | // Setup |
| 79 | ComplexNullFields::drop_table(executor, true, false) |
| 80 | .await |
| 81 | .expect("Failed to drop ComplexNullFields table"); |
| 82 | ComplexNullFields::create_table(executor, true, true) |
| 83 | .await |
| 84 | .expect("Failed to create ComplexNullFields table"); |
| 85 | |
| 86 | // Complex 1 |
| 87 | ComplexNullFields::delete_many(executor, true) |
| 88 | .await |
| 89 | .expect("Failed to clear the ComplexNullFields table"); |
| 90 | let entity = ComplexNullFields { |
| 91 | #[cfg(not(feature = "disable-arrays"))] |
| 92 | first: None, |
| 93 | #[cfg(all( |
| 94 | not(feature = "disable-lists"), |
| 95 | not(feature = "disable-intervals"), |
| 96 | not(feature = "disable-nested-collections"), |
| 97 | ))] |
| 98 | second: Some(vec![ |
| 99 | None, |
| 100 | None, |
| 101 | Duration::from_millis(15).into(), |
| 102 | Duration::from_micros(22).into(), |
| 103 | None, |
| 104 | Duration::from_micros(99).into(), |
| 105 | Duration::from_micros(0).into(), |
| 106 | Duration::from_secs(24).into(), |
| 107 | None, |
| 108 | None, |
| 109 | None, |
| 110 | ]), |
| 111 | third: Some(Box::new([0x75, 0xAA, 0x30, 0x77])), |
| 112 | #[cfg(all( |
| 113 | not(feature = "disable-arrays"), |
| 114 | not(feature = "disable-large-integers"), |
| 115 | not(feature = "disable-maps"), |
| 116 | not(feature = "disable-nested-collections"), |
| 117 | ))] |
| 118 | fourth: Some(Box::new(BTreeMap::from_iter([ |
| 119 | ("aa".into(), Some([19314.into(), 241211.into(), None])), |
| 120 | ( |
| 121 | "bb".into(), |
| 122 | Some([165536.into(), 23311090.into(), 30001.into()]), |
| 123 | ), |
| 124 | ("cc".into(), None), |
| 125 | ("dd".into(), Some([None, None, None])), |
| 126 | ("ee".into(), Some([None, 777.into(), None])), |
| 127 | ]))), |
| 128 | #[cfg(all( |
| 129 | not(feature = "disable-lists"), |
| 130 | not(feature = "disable-maps"), |
| 131 | not(feature = "disable-nested-collections"), |
| 132 | ))] |