We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2858a8 commit f58ed87Copy full SHA for f58ed87
scripts/insert.js
@@ -0,0 +1,37 @@
1
+// Insert document customers
2
+db.customers.insertOne({
3
+ _id: "khannedy",
4
+ name: "Eko Kurniawan Khannedy"
5
+});
6
+
7
+// Insert document products
8
+db.products.insertMany([
9
+ {
10
+ _id: 1,
11
+ name: "Indomie Ayam Bawang",
12
+ price: new NumberLong(2000)
13
+ },
14
15
+ _id: 2,
16
+ name: "Mie Sedap",
17
18
+ }
19
+]);
20
21
+// Insert document orders
22
+db.orders.insertOne({
23
+ _id: new ObjectId(),
24
+ total: new NumberLong(8000),
25
+ items: [
26
27
+ product_id: 1,
28
+ price: new NumberLong(2000),
29
+ quantity: new NumberInt(2)
30
31
32
+ product_id: 2,
33
34
35
36
+ ]
37
+})
0 commit comments