(
core: &mut nodedb::data::executor::core_loop::CoreLoop,
tx: &mut nodedb_bridge::buffer::Producer<nodedb::bridge::dispatch::BridgeRequest>,
rx: &mut nodedb_bridge::buffer::Consumer<nodedb
| 48 | } |
| 49 | |
| 50 | fn seed( |
| 51 | core: &mut nodedb::data::executor::core_loop::CoreLoop, |
| 52 | tx: &mut nodedb_bridge::buffer::Producer<nodedb::bridge::dispatch::BridgeRequest>, |
| 53 | rx: &mut nodedb_bridge::buffer::Consumer<nodedb::bridge::dispatch::BridgeResponse>, |
| 54 | ) { |
| 55 | insert_product( |
| 56 | core, |
| 57 | tx, |
| 58 | rx, |
| 59 | "p1", |
| 60 | serde_json::json!({ |
| 61 | "name": "T-Shirt", "brand": "Nike", "tags": ["sale", "new"], "sizes": ["S", "M", "L"], "color": "red" |
| 62 | }), |
| 63 | ); |
| 64 | insert_product( |
| 65 | core, |
| 66 | tx, |
| 67 | rx, |
| 68 | "p2", |
| 69 | serde_json::json!({ |
| 70 | "name": "Sneaker", "brand": "Nike", "tags": ["new"], "sizes": ["M", "L", "XL"], "color": "blue" |
| 71 | }), |
| 72 | ); |
| 73 | insert_product( |
| 74 | core, |
| 75 | tx, |
| 76 | rx, |
| 77 | "p3", |
| 78 | serde_json::json!({ |
| 79 | "name": "Cap", "brand": "Adidas", "tags": ["sale", "clearance"], "sizes": ["S"], "color": "red" |
| 80 | }), |
| 81 | ); |
| 82 | insert_product( |
| 83 | core, |
| 84 | tx, |
| 85 | rx, |
| 86 | "p4", |
| 87 | serde_json::json!({ |
| 88 | "name": "Pants", "brand": "Puma", "tags": ["premium"], "sizes": ["M", "L"], "color": "blue" |
| 89 | }), |
| 90 | ); |
| 91 | } |
| 92 | |
| 93 | #[test] |
| 94 | fn array_contains_filter() { |
no test coverage detected