INNER CODE UNIT · Rust

test_build_sql_with_multiply

fcoury/oxide · src/commands/aggregate/mod.rs:246

    fn test_build_sql_with_multiply() {
        let doc = doc! {
            "pipeline": [
                doc! {
                    "$group": {
                        "_id": "$item",
                        "total_sum": {
                            "$sum": {
                                "$multiply": [
                                    "$quantity",
                                    "$price"
                                ]
                            }
                        }
                    }
                }
            ]
        };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…