├── Mongoose ├── package.json ├── FruitsProject │ ├── package.json │ ├── Mongoose.txt │ ├── package-lock.json │ └── app.js └── package-lock.json ├── README.md ├── MongoDB └── FruitsProject │ ├── package.json │ ├── app.js │ ├── SQL.txt │ ├── MongoDB.txt │ └── package-lock.json └── SQL.txt /Mongoose/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mongoose": "^6.5.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQL 2 | 3 | ![image](https://user-images.githubusercontent.com/107684179/187023448-da9a286c-333c-4737-95e7-5dc70cfc3605.png) 4 | 5 | # Databases 6 | ![image](https://user-images.githubusercontent.com/107684179/187027842-cd75cbb9-f695-4c2c-a23a-dafe84aa0882.png) 7 | 8 | -------------------------------------------------------------------------------- /MongoDB/FruitsProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fruitsproject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "mongodb": "^4.9.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Mongoose/FruitsProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fruitsproject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "mongodb": "^4.9.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Mongoose/FruitsProject/Mongoose.txt: -------------------------------------------------------------------------------- 1 | //336 2 | > show dbs 3 | > use fruitsDB 4 | > db.dropDatabase() 5 | > show dbs 6 | > show dbs 7 | > use fruitDB 8 | > show collections 9 | > db.fruits.find() 10 | > show collections 11 | > db.people.find() 12 | > db.fruits.find() 13 | 14 | //337 15 | > db.fruits.find() 16 | 17 | //338 18 | > db.fruits.find() 19 | > show collections 20 | 21 | //339 22 | > db.people.find() 23 | > db.people.find() 24 | 25 | //340 26 | > db.people.find() 27 | > db.fruits.find() 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /MongoDB/FruitsProject/app.js: -------------------------------------------------------------------------------- 1 | // 333 2 | const MongoClient = require('mongodb').MongoClient; 3 | const assert = require('assert'); 4 | 5 | const url = 'mongodb://localhost:27017'; 6 | 7 | const dbName = 'fruitsDB'; 8 | 9 | const client = new MongoClient(url, { useNewUrlParser: true }); 10 | 11 | client.connect(function(err) { 12 | 13 | assert.equal(null, err); 14 | console.log('Connected successfully to server'); 15 | 16 | const db = client.db(dbName); 17 | 18 | findDocuments(db, function() { 19 | client.close(); 20 | }); 21 | }); 22 | 23 | const insertDocuments = function(db, callback) { 24 | 25 | const collection = db.collection('fruits'); 26 | 27 | collection.insertMany([ 28 | { 29 | name : 'Apple', 30 | score: 8, 31 | review: 'Great fruit' 32 | }, 33 | { 34 | name : 'Orange', 35 | score: 6, 36 | review: 'Kinda sour' 37 | }, 38 | { 39 | name : 'Banana', 40 | score: 9, 41 | review: 'Great stuff!' 42 | } 43 | ], function(err, result) { 44 | assert.equal(err, null); 45 | assert.equal(3, result.result.n); 46 | assert.equal(3, result.ops.length); 47 | console.log('Inserted 3 documents into the collection'); 48 | callback(result); 49 | }); 50 | }; 51 | 52 | const findDocuments = function(db, callback) { 53 | 54 | const collection = db.collection('fruits'); 55 | 56 | collection.find({}).toArray(function(err, fruits) { 57 | assert.equal(err, null); 58 | console.log('Found the following records'); 59 | console.log(fruits); 60 | callback(fruits); 61 | }); 62 | } 63 | 64 | // npm init -y 65 | // npm i mongodb 66 | // 1--> node app.js 67 | // 3--> node app.js (Connected successfully to server) 68 | 69 | // *File > New Tab 70 | // 2--> mongod 71 | 72 | // paste *{ useNewUrlParser: true } 73 | // node app.js 74 | 75 | // *File > New Tab 76 | // mongo 77 | // show dbs 78 | // use fruitsDB 79 | // show collections 80 | // db.fruits.find() 81 | 82 | // node app.js -------------------------------------------------------------------------------- /SQL.txt: -------------------------------------------------------------------------------- 1 | Databases: 2 | SQL - Structured Query Language (MySQL, PostgreSQL...) 3 | - Relational 4 | *MySQL 5 | - More Mature 6 | - Table Structure 7 | - Requires a Schema 8 | - Great with Relationships 9 | - Scales Vertically 10 | 11 | 12 | 13 | NoSQL - Not only Structured Query Language (MongoDB, Redis...) 14 | - Non-Relational 15 | *MongoDB 16 | - Shiny and New 17 | - Document Structure 18 | - More Flexible to Change 19 | - Not Great with Complex Relationships 20 | - Horizontally Scalable 21 | 22 | 23 | 24 | 25 | https://sqliteonline.com/ 26 | www.w3schools.com/sql/ 27 | 28 | SQL commands: 29 | Create 30 | Read 31 | Update 32 | Destroy 33 | 34 | 35 | 36 | - Create 37 | CREATE TABLE products ( 38 | id Int NOT NULL, 39 | name STRING, 40 | price MONEY, 41 | PRIMARY KEY (id) 42 | ); 43 | 44 | INSERT INTO products 45 | VALUES (1, 'Pen', 1.20) 46 | 47 | INSERT INTO products (id, name) 48 | VALUES (2, 'Pencil') 49 | 50 | 51 | 52 | - Read 53 | SELECT name, price FROM 'products'; 54 | 55 | SELECT * FROM products WHERE id = 1 56 | 57 | 58 | 59 | - Update 60 | UPDATE products 61 | SET price = 0.80 62 | WHERE id = 2 63 | 64 | ALTER TABLE products 65 | ADD stock int 66 | 67 | 68 | 69 | - Destroy / Delete 70 | DELETE FROM products 71 | WHERE id = 2 72 | 73 | 74 | 75 | - Foreign KEY 76 | CREATE TABLE orders ( 77 | id Int NOT NULL, 78 | order_number int, 79 | customer_id int, 80 | product_id int, 81 | PRIMARY KEY (id) 82 | FOREIGN KEY (customer_id) REFERENCES customer(id), 83 | FOREIGN KEY (product_id) REFERENCES products(id) 84 | ) 85 | 86 | INSERT INTO orders 87 | VALUES (1, 4362, 2, 1) 88 | 89 | 90 | 91 | - Inner Join(link 2 product together) 92 | SELECT orders.order_number, customers.first_name, customers.last_name, customers.address 93 | FROM orders 94 | INNER JOIN customers on orders.customer_id = customers.id 95 | 96 | SELECT orders.order_number, products.name, products.price, products.stock 97 | FROM orders 98 | INNER JOIN products on orders.product_id = products.id 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /MongoDB/FruitsProject/SQL.txt: -------------------------------------------------------------------------------- 1 | Databases: 2 | SQL - Structured Query Language (MySQL, PostgreSQL...) 3 | - Relational 4 | *MySQL 5 | - More Mature 6 | - Table Structure 7 | - Requires a Schema 8 | - Great with Relationships 9 | - Scales Vertically 10 | 11 | 12 | 13 | NoSQL - Not only Structured Query Language (MongoDB, Redis...) 14 | - Non-Relational 15 | *MongoDB 16 | - Shiny and New 17 | - Document Structure 18 | - More Flexible to Change 19 | - Not Great with Complex Relationships 20 | - Horizontally Scalable 21 | 22 | 23 | 24 | 25 | https://sqliteonline.com/ 26 | www.w3schools.com/sql/ 27 | 28 | SQL commands: 29 | Create 30 | Read 31 | Update 32 | Destroy 33 | 34 | 35 | 36 | - Create 37 | CREATE TABLE products ( 38 | id Int NOT NULL, 39 | name STRING, 40 | price MONEY, 41 | PRIMARY KEY (id) 42 | ); 43 | 44 | INSERT INTO products 45 | VALUES (1, 'Pen', 1.20) 46 | 47 | INSERT INTO products (id, name) 48 | VALUES (2, 'Pencil') 49 | 50 | 51 | 52 | - Read 53 | SELECT name, price FROM 'products'; 54 | 55 | SELECT * FROM products WHERE id = 1 56 | 57 | 58 | 59 | - Update 60 | UPDATE products 61 | SET price = 0.80 62 | WHERE id = 2 63 | 64 | ALTER TABLE products 65 | ADD stock int 66 | 67 | 68 | 69 | - Destroy / Delete 70 | DELETE FROM products 71 | WHERE id = 2 72 | 73 | 74 | 75 | - Foreign KEY 76 | CREATE TABLE orders ( 77 | id Int NOT NULL, 78 | order_number int, 79 | customer_id int, 80 | product_id int, 81 | PRIMARY KEY (id) 82 | FOREIGN KEY (customer_id) REFERENCES customer(id), 83 | FOREIGN KEY (product_id) REFERENCES products(id) 84 | ) 85 | 86 | INSERT INTO orders 87 | VALUES (1, 4362, 2, 1) 88 | 89 | 90 | 91 | - Inner Join(link 2 product together) 92 | SELECT orders.order_number, customers.first_name, customers.last_name, customers.address 93 | FROM orders 94 | INNER JOIN customers on orders.customer_id = customers.id 95 | 96 | SELECT orders.order_number, products.name, products.price, products.stock 97 | FROM orders 98 | INNER JOIN products on orders.product_id = products.id 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /MongoDB/FruitsProject/MongoDB.txt: -------------------------------------------------------------------------------- 1 | - MongoDB 2 | 3 | https://www.mongodb.com/try/download/community 4 | OS(C:) > Program Files > MongoDB > Server > 6.0 > bin 5 | 6 | OS(C:) > Create(data) Files > Create(db) Files 7 | 8 | cd ~ 9 | touch .bash_profile 10 | ls -a 11 | vim .bash_profile 12 | alias mongod="/c/Program\ files/MongoDB/Server/6.0/bin/mongod.exe" 13 | alias mongo="/c/Program\ Files/MongoDB/Server/6.0/bin/mongo.exe" 14 | :wq! 15 | mongo --version 16 | 17 | 18 | 19 | Create 20 | Read 21 | Update 22 | Delete 23 | 24 | 25 | 26 | - Create 27 | mongod 28 | mongo 29 | > help 30 | > show dbs 31 | > use shopDB 32 | > show dbs 33 | > db 34 | > db.products.insertOne({_id: 1, name: "Pen", price: 1.20}) 35 | > show collections 36 | > db 37 | > db.products.insertOne({_id: 2, name: "Pencil", price: 0.80}) 38 | 39 | 40 | 41 | - Read 42 | > db.products.find() 43 | > db.products.find({name: "Pencil"}) 44 | > db.products.find({price: {$gt: 1}}) 45 | > db.products.find({_id: 1}, {name: 1}) 46 | > db.products.find({_id: 1}, {name: 1, _id: 0}) 47 | 48 | 49 | 50 | - Update 51 | > db.products.updateOne({_id: 1}, {$set: {stock: 32}}) 52 | > db.products.find() 53 | > db.products.updateOne({_id: 2}, {$set: {stock: 12}}) 54 | > db.products.find() 55 | 56 | 57 | 58 | - Delete 59 | > db.products.deleteOne({_id: 2}) 60 | > db.products.find() 61 | 62 | 63 | 64 | - Relationships 65 | > db.products.insert( 66 | { 67 | _id: 3, 68 | name: 'Rubber', 69 | price: 1.30, 70 | stock: 43, 71 | reviews: [ 72 | { 73 | authorName: 'Sally', 74 | rating: 5, 75 | review: 'Best rubber ever!' 76 | }, 77 | { 78 | authorName: 'John', 79 | rating: 5, 80 | review: 'Awesome rubber!' 81 | } 82 | ] 83 | } 84 | ) 85 | > db.products.find() 86 | > db.products.insertOne({ 87 | _id: 2, 88 | name: "Pencil", 89 | price: 0.80, 90 | stock: 12, 91 | review: [ 92 | { 93 | authorName: "James", 94 | rating: 5, 95 | review: "Fantastic" 96 | }, 97 | { 98 | authorName: "Jono", 99 | rating: 5, 100 | review: "The best pencil I've used in my life." 101 | } 102 | ] 103 | }) 104 | > db.products.find() 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /MongoDB/FruitsProject/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fruitsproject", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "fruitsproject", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "mongodb": "^4.9.0" 13 | } 14 | }, 15 | "node_modules/@types/node": { 16 | "version": "18.7.13", 17 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 18 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 19 | }, 20 | "node_modules/@types/webidl-conversions": { 21 | "version": "6.1.1", 22 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 23 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 24 | }, 25 | "node_modules/@types/whatwg-url": { 26 | "version": "8.2.2", 27 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 28 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 29 | "dependencies": { 30 | "@types/node": "*", 31 | "@types/webidl-conversions": "*" 32 | } 33 | }, 34 | "node_modules/base64-js": { 35 | "version": "1.5.1", 36 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 37 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 38 | "funding": [ 39 | { 40 | "type": "github", 41 | "url": "https://github.com/sponsors/feross" 42 | }, 43 | { 44 | "type": "patreon", 45 | "url": "https://www.patreon.com/feross" 46 | }, 47 | { 48 | "type": "consulting", 49 | "url": "https://feross.org/support" 50 | } 51 | ] 52 | }, 53 | "node_modules/bson": { 54 | "version": "4.7.0", 55 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 56 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 57 | "dependencies": { 58 | "buffer": "^5.6.0" 59 | }, 60 | "engines": { 61 | "node": ">=6.9.0" 62 | } 63 | }, 64 | "node_modules/buffer": { 65 | "version": "5.7.1", 66 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 67 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 68 | "funding": [ 69 | { 70 | "type": "github", 71 | "url": "https://github.com/sponsors/feross" 72 | }, 73 | { 74 | "type": "patreon", 75 | "url": "https://www.patreon.com/feross" 76 | }, 77 | { 78 | "type": "consulting", 79 | "url": "https://feross.org/support" 80 | } 81 | ], 82 | "dependencies": { 83 | "base64-js": "^1.3.1", 84 | "ieee754": "^1.1.13" 85 | } 86 | }, 87 | "node_modules/denque": { 88 | "version": "2.1.0", 89 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 90 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 91 | "engines": { 92 | "node": ">=0.10" 93 | } 94 | }, 95 | "node_modules/ieee754": { 96 | "version": "1.2.1", 97 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 98 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 99 | "funding": [ 100 | { 101 | "type": "github", 102 | "url": "https://github.com/sponsors/feross" 103 | }, 104 | { 105 | "type": "patreon", 106 | "url": "https://www.patreon.com/feross" 107 | }, 108 | { 109 | "type": "consulting", 110 | "url": "https://feross.org/support" 111 | } 112 | ] 113 | }, 114 | "node_modules/ip": { 115 | "version": "2.0.0", 116 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 117 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 118 | }, 119 | "node_modules/memory-pager": { 120 | "version": "1.5.0", 121 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 122 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 123 | "optional": true 124 | }, 125 | "node_modules/mongodb": { 126 | "version": "4.9.0", 127 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.0.tgz", 128 | "integrity": "sha512-tJJEFJz7OQTQPZeVHZJIeSOjMRqc5eSyXTt86vSQENEErpkiG7279tM/GT5AVZ7TgXNh9HQxoa2ZkbrANz5GQw==", 129 | "dependencies": { 130 | "bson": "^4.7.0", 131 | "denque": "^2.1.0", 132 | "mongodb-connection-string-url": "^2.5.3", 133 | "socks": "^2.7.0" 134 | }, 135 | "engines": { 136 | "node": ">=12.9.0" 137 | }, 138 | "optionalDependencies": { 139 | "saslprep": "^1.0.3" 140 | } 141 | }, 142 | "node_modules/mongodb-connection-string-url": { 143 | "version": "2.5.3", 144 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 145 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 146 | "dependencies": { 147 | "@types/whatwg-url": "^8.2.1", 148 | "whatwg-url": "^11.0.0" 149 | } 150 | }, 151 | "node_modules/punycode": { 152 | "version": "2.1.1", 153 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 154 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 155 | "engines": { 156 | "node": ">=6" 157 | } 158 | }, 159 | "node_modules/saslprep": { 160 | "version": "1.0.3", 161 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 162 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 163 | "optional": true, 164 | "dependencies": { 165 | "sparse-bitfield": "^3.0.3" 166 | }, 167 | "engines": { 168 | "node": ">=6" 169 | } 170 | }, 171 | "node_modules/smart-buffer": { 172 | "version": "4.2.0", 173 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 174 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", 175 | "engines": { 176 | "node": ">= 6.0.0", 177 | "npm": ">= 3.0.0" 178 | } 179 | }, 180 | "node_modules/socks": { 181 | "version": "2.7.0", 182 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 183 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 184 | "dependencies": { 185 | "ip": "^2.0.0", 186 | "smart-buffer": "^4.2.0" 187 | }, 188 | "engines": { 189 | "node": ">= 10.13.0", 190 | "npm": ">= 3.0.0" 191 | } 192 | }, 193 | "node_modules/sparse-bitfield": { 194 | "version": "3.0.3", 195 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 196 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 197 | "optional": true, 198 | "dependencies": { 199 | "memory-pager": "^1.0.2" 200 | } 201 | }, 202 | "node_modules/tr46": { 203 | "version": "3.0.0", 204 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 205 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 206 | "dependencies": { 207 | "punycode": "^2.1.1" 208 | }, 209 | "engines": { 210 | "node": ">=12" 211 | } 212 | }, 213 | "node_modules/webidl-conversions": { 214 | "version": "7.0.0", 215 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 216 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 217 | "engines": { 218 | "node": ">=12" 219 | } 220 | }, 221 | "node_modules/whatwg-url": { 222 | "version": "11.0.0", 223 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 224 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 225 | "dependencies": { 226 | "tr46": "^3.0.0", 227 | "webidl-conversions": "^7.0.0" 228 | }, 229 | "engines": { 230 | "node": ">=12" 231 | } 232 | } 233 | }, 234 | "dependencies": { 235 | "@types/node": { 236 | "version": "18.7.13", 237 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 238 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 239 | }, 240 | "@types/webidl-conversions": { 241 | "version": "6.1.1", 242 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 243 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 244 | }, 245 | "@types/whatwg-url": { 246 | "version": "8.2.2", 247 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 248 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 249 | "requires": { 250 | "@types/node": "*", 251 | "@types/webidl-conversions": "*" 252 | } 253 | }, 254 | "base64-js": { 255 | "version": "1.5.1", 256 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 257 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 258 | }, 259 | "bson": { 260 | "version": "4.7.0", 261 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 262 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 263 | "requires": { 264 | "buffer": "^5.6.0" 265 | } 266 | }, 267 | "buffer": { 268 | "version": "5.7.1", 269 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 270 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 271 | "requires": { 272 | "base64-js": "^1.3.1", 273 | "ieee754": "^1.1.13" 274 | } 275 | }, 276 | "denque": { 277 | "version": "2.1.0", 278 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 279 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" 280 | }, 281 | "ieee754": { 282 | "version": "1.2.1", 283 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 284 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 285 | }, 286 | "ip": { 287 | "version": "2.0.0", 288 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 289 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 290 | }, 291 | "memory-pager": { 292 | "version": "1.5.0", 293 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 294 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 295 | "optional": true 296 | }, 297 | "mongodb": { 298 | "version": "4.9.0", 299 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.0.tgz", 300 | "integrity": "sha512-tJJEFJz7OQTQPZeVHZJIeSOjMRqc5eSyXTt86vSQENEErpkiG7279tM/GT5AVZ7TgXNh9HQxoa2ZkbrANz5GQw==", 301 | "requires": { 302 | "bson": "^4.7.0", 303 | "denque": "^2.1.0", 304 | "mongodb-connection-string-url": "^2.5.3", 305 | "saslprep": "^1.0.3", 306 | "socks": "^2.7.0" 307 | } 308 | }, 309 | "mongodb-connection-string-url": { 310 | "version": "2.5.3", 311 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 312 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 313 | "requires": { 314 | "@types/whatwg-url": "^8.2.1", 315 | "whatwg-url": "^11.0.0" 316 | } 317 | }, 318 | "punycode": { 319 | "version": "2.1.1", 320 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 321 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 322 | }, 323 | "saslprep": { 324 | "version": "1.0.3", 325 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 326 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 327 | "optional": true, 328 | "requires": { 329 | "sparse-bitfield": "^3.0.3" 330 | } 331 | }, 332 | "smart-buffer": { 333 | "version": "4.2.0", 334 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 335 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" 336 | }, 337 | "socks": { 338 | "version": "2.7.0", 339 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 340 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 341 | "requires": { 342 | "ip": "^2.0.0", 343 | "smart-buffer": "^4.2.0" 344 | } 345 | }, 346 | "sparse-bitfield": { 347 | "version": "3.0.3", 348 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 349 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 350 | "optional": true, 351 | "requires": { 352 | "memory-pager": "^1.0.2" 353 | } 354 | }, 355 | "tr46": { 356 | "version": "3.0.0", 357 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 358 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 359 | "requires": { 360 | "punycode": "^2.1.1" 361 | } 362 | }, 363 | "webidl-conversions": { 364 | "version": "7.0.0", 365 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 366 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" 367 | }, 368 | "whatwg-url": { 369 | "version": "11.0.0", 370 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 371 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 372 | "requires": { 373 | "tr46": "^3.0.0", 374 | "webidl-conversions": "^7.0.0" 375 | } 376 | } 377 | } 378 | } 379 | -------------------------------------------------------------------------------- /Mongoose/FruitsProject/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fruitsproject", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "fruitsproject", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "mongodb": "^4.9.0" 13 | } 14 | }, 15 | "node_modules/@types/node": { 16 | "version": "18.7.13", 17 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 18 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 19 | }, 20 | "node_modules/@types/webidl-conversions": { 21 | "version": "6.1.1", 22 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 23 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 24 | }, 25 | "node_modules/@types/whatwg-url": { 26 | "version": "8.2.2", 27 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 28 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 29 | "dependencies": { 30 | "@types/node": "*", 31 | "@types/webidl-conversions": "*" 32 | } 33 | }, 34 | "node_modules/base64-js": { 35 | "version": "1.5.1", 36 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 37 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 38 | "funding": [ 39 | { 40 | "type": "github", 41 | "url": "https://github.com/sponsors/feross" 42 | }, 43 | { 44 | "type": "patreon", 45 | "url": "https://www.patreon.com/feross" 46 | }, 47 | { 48 | "type": "consulting", 49 | "url": "https://feross.org/support" 50 | } 51 | ] 52 | }, 53 | "node_modules/bson": { 54 | "version": "4.7.0", 55 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 56 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 57 | "dependencies": { 58 | "buffer": "^5.6.0" 59 | }, 60 | "engines": { 61 | "node": ">=6.9.0" 62 | } 63 | }, 64 | "node_modules/buffer": { 65 | "version": "5.7.1", 66 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 67 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 68 | "funding": [ 69 | { 70 | "type": "github", 71 | "url": "https://github.com/sponsors/feross" 72 | }, 73 | { 74 | "type": "patreon", 75 | "url": "https://www.patreon.com/feross" 76 | }, 77 | { 78 | "type": "consulting", 79 | "url": "https://feross.org/support" 80 | } 81 | ], 82 | "dependencies": { 83 | "base64-js": "^1.3.1", 84 | "ieee754": "^1.1.13" 85 | } 86 | }, 87 | "node_modules/denque": { 88 | "version": "2.1.0", 89 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 90 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 91 | "engines": { 92 | "node": ">=0.10" 93 | } 94 | }, 95 | "node_modules/ieee754": { 96 | "version": "1.2.1", 97 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 98 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 99 | "funding": [ 100 | { 101 | "type": "github", 102 | "url": "https://github.com/sponsors/feross" 103 | }, 104 | { 105 | "type": "patreon", 106 | "url": "https://www.patreon.com/feross" 107 | }, 108 | { 109 | "type": "consulting", 110 | "url": "https://feross.org/support" 111 | } 112 | ] 113 | }, 114 | "node_modules/ip": { 115 | "version": "2.0.0", 116 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 117 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 118 | }, 119 | "node_modules/memory-pager": { 120 | "version": "1.5.0", 121 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 122 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 123 | "optional": true 124 | }, 125 | "node_modules/mongodb": { 126 | "version": "4.9.0", 127 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.0.tgz", 128 | "integrity": "sha512-tJJEFJz7OQTQPZeVHZJIeSOjMRqc5eSyXTt86vSQENEErpkiG7279tM/GT5AVZ7TgXNh9HQxoa2ZkbrANz5GQw==", 129 | "dependencies": { 130 | "bson": "^4.7.0", 131 | "denque": "^2.1.0", 132 | "mongodb-connection-string-url": "^2.5.3", 133 | "socks": "^2.7.0" 134 | }, 135 | "engines": { 136 | "node": ">=12.9.0" 137 | }, 138 | "optionalDependencies": { 139 | "saslprep": "^1.0.3" 140 | } 141 | }, 142 | "node_modules/mongodb-connection-string-url": { 143 | "version": "2.5.3", 144 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 145 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 146 | "dependencies": { 147 | "@types/whatwg-url": "^8.2.1", 148 | "whatwg-url": "^11.0.0" 149 | } 150 | }, 151 | "node_modules/punycode": { 152 | "version": "2.1.1", 153 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 154 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 155 | "engines": { 156 | "node": ">=6" 157 | } 158 | }, 159 | "node_modules/saslprep": { 160 | "version": "1.0.3", 161 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 162 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 163 | "optional": true, 164 | "dependencies": { 165 | "sparse-bitfield": "^3.0.3" 166 | }, 167 | "engines": { 168 | "node": ">=6" 169 | } 170 | }, 171 | "node_modules/smart-buffer": { 172 | "version": "4.2.0", 173 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 174 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", 175 | "engines": { 176 | "node": ">= 6.0.0", 177 | "npm": ">= 3.0.0" 178 | } 179 | }, 180 | "node_modules/socks": { 181 | "version": "2.7.0", 182 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 183 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 184 | "dependencies": { 185 | "ip": "^2.0.0", 186 | "smart-buffer": "^4.2.0" 187 | }, 188 | "engines": { 189 | "node": ">= 10.13.0", 190 | "npm": ">= 3.0.0" 191 | } 192 | }, 193 | "node_modules/sparse-bitfield": { 194 | "version": "3.0.3", 195 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 196 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 197 | "optional": true, 198 | "dependencies": { 199 | "memory-pager": "^1.0.2" 200 | } 201 | }, 202 | "node_modules/tr46": { 203 | "version": "3.0.0", 204 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 205 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 206 | "dependencies": { 207 | "punycode": "^2.1.1" 208 | }, 209 | "engines": { 210 | "node": ">=12" 211 | } 212 | }, 213 | "node_modules/webidl-conversions": { 214 | "version": "7.0.0", 215 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 216 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 217 | "engines": { 218 | "node": ">=12" 219 | } 220 | }, 221 | "node_modules/whatwg-url": { 222 | "version": "11.0.0", 223 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 224 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 225 | "dependencies": { 226 | "tr46": "^3.0.0", 227 | "webidl-conversions": "^7.0.0" 228 | }, 229 | "engines": { 230 | "node": ">=12" 231 | } 232 | } 233 | }, 234 | "dependencies": { 235 | "@types/node": { 236 | "version": "18.7.13", 237 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 238 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 239 | }, 240 | "@types/webidl-conversions": { 241 | "version": "6.1.1", 242 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 243 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 244 | }, 245 | "@types/whatwg-url": { 246 | "version": "8.2.2", 247 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 248 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 249 | "requires": { 250 | "@types/node": "*", 251 | "@types/webidl-conversions": "*" 252 | } 253 | }, 254 | "base64-js": { 255 | "version": "1.5.1", 256 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 257 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 258 | }, 259 | "bson": { 260 | "version": "4.7.0", 261 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 262 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 263 | "requires": { 264 | "buffer": "^5.6.0" 265 | } 266 | }, 267 | "buffer": { 268 | "version": "5.7.1", 269 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 270 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 271 | "requires": { 272 | "base64-js": "^1.3.1", 273 | "ieee754": "^1.1.13" 274 | } 275 | }, 276 | "denque": { 277 | "version": "2.1.0", 278 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 279 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" 280 | }, 281 | "ieee754": { 282 | "version": "1.2.1", 283 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 284 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 285 | }, 286 | "ip": { 287 | "version": "2.0.0", 288 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 289 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 290 | }, 291 | "memory-pager": { 292 | "version": "1.5.0", 293 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 294 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 295 | "optional": true 296 | }, 297 | "mongodb": { 298 | "version": "4.9.0", 299 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.0.tgz", 300 | "integrity": "sha512-tJJEFJz7OQTQPZeVHZJIeSOjMRqc5eSyXTt86vSQENEErpkiG7279tM/GT5AVZ7TgXNh9HQxoa2ZkbrANz5GQw==", 301 | "requires": { 302 | "bson": "^4.7.0", 303 | "denque": "^2.1.0", 304 | "mongodb-connection-string-url": "^2.5.3", 305 | "saslprep": "^1.0.3", 306 | "socks": "^2.7.0" 307 | } 308 | }, 309 | "mongodb-connection-string-url": { 310 | "version": "2.5.3", 311 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 312 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 313 | "requires": { 314 | "@types/whatwg-url": "^8.2.1", 315 | "whatwg-url": "^11.0.0" 316 | } 317 | }, 318 | "punycode": { 319 | "version": "2.1.1", 320 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 321 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 322 | }, 323 | "saslprep": { 324 | "version": "1.0.3", 325 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 326 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 327 | "optional": true, 328 | "requires": { 329 | "sparse-bitfield": "^3.0.3" 330 | } 331 | }, 332 | "smart-buffer": { 333 | "version": "4.2.0", 334 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 335 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" 336 | }, 337 | "socks": { 338 | "version": "2.7.0", 339 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 340 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 341 | "requires": { 342 | "ip": "^2.0.0", 343 | "smart-buffer": "^4.2.0" 344 | } 345 | }, 346 | "sparse-bitfield": { 347 | "version": "3.0.3", 348 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 349 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 350 | "optional": true, 351 | "requires": { 352 | "memory-pager": "^1.0.2" 353 | } 354 | }, 355 | "tr46": { 356 | "version": "3.0.0", 357 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 358 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 359 | "requires": { 360 | "punycode": "^2.1.1" 361 | } 362 | }, 363 | "webidl-conversions": { 364 | "version": "7.0.0", 365 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 366 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" 367 | }, 368 | "whatwg-url": { 369 | "version": "11.0.0", 370 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 371 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 372 | "requires": { 373 | "tr46": "^3.0.0", 374 | "webidl-conversions": "^7.0.0" 375 | } 376 | } 377 | } 378 | } 379 | -------------------------------------------------------------------------------- /Mongoose/FruitsProject/app.js: -------------------------------------------------------------------------------- 1 | // 336 Create 2 | // const mongoose = require('mongoose'); 3 | 4 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 5 | 6 | // const fruitSchema = new mongoose.Schema ({ 7 | // name: String, 8 | // rating: Number, 9 | // review: String 10 | // }); 11 | 12 | // const Fruit = mongoose.model('Fruit', fruitSchema); 13 | 14 | // const fruit = new Fruit ({ 15 | // name: 'Apple', 16 | // rating: 7, 17 | // review: 'Pretty solid as a fruit.' 18 | // }); 19 | 20 | // fruit.save(); 21 | 22 | // const findDocuments = function(db, callback) { 23 | 24 | // const collection = db.collection('fruits'); 25 | 26 | // collection.find({}).toArray(function(err, fruits) { 27 | // assert.equal(err, null); 28 | // console.log('Found the following records'); 29 | // console.log(fruits); 30 | // callback(fruits); 31 | // }); 32 | 33 | // const personSchema = new mongoose.Schema ({ 34 | // name: String, 35 | // age: Number 36 | // }); 37 | 38 | // const Person = mongoose.model('Person', personSchema); 39 | 40 | // const person = new Person({ 41 | // name: 'Jason', 42 | // age: 26 43 | // }); 44 | 45 | // person.save(); 46 | 47 | // const kiwi = new Fruit({ 48 | // name: 'Kiwi', 49 | // score: 10, 50 | // review: 'The best fruit!' 51 | // }); 52 | 53 | // const orange = new Fruit({ 54 | // name: 'Orange', 55 | // score: 4, 56 | // review: 'Too sour for me' 57 | // }); 58 | 59 | // const banana = new Fruit({ 60 | // name: 'Banana', 61 | // score: 3, 62 | // review: 'Weird texture' 63 | // }); 64 | 65 | // Fruit.insertMany([kiwi, orange, banana], function(err){ 66 | // if (err) { 67 | // console.log(err); 68 | // } else { 69 | // console.log('succesfully saved all the fruits to fruitsDB'); 70 | // } 71 | // }); 72 | 73 | // } 74 | 75 | // npm i mongoose 76 | 77 | 78 | 79 | // 337 Read 80 | // const mongoose = require('mongoose'); 81 | 82 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 83 | 84 | // const fruitSchema = new mongoose.Schema ({ 85 | // name: String, 86 | // rating: Number, 87 | // review: String 88 | // }); 89 | 90 | // const Fruit = mongoose.model('Fruit', fruitSchema); 91 | 92 | // const fruit = new Fruit ({ 93 | // name: 'Apple', 94 | // rating: 7, 95 | // review: 'Pretty solid as a fruit.' 96 | // }); 97 | 98 | // fruit.save(); 99 | 100 | // const findDocuments = function(db, callback) { 101 | 102 | // const collection = db.collection('fruits'); 103 | 104 | // collection.find({}).toArray(function(err, fruits) { 105 | // assert.equal(err, null); 106 | // console.log('Found the following records'); 107 | // console.log(fruits); 108 | // callback(fruits); 109 | // }); 110 | 111 | // const personSchema = new mongoose.Schema ({ 112 | // name: String, 113 | // age: Number 114 | // }); 115 | 116 | // const Person = mongoose.model('Person', personSchema); 117 | 118 | // const person = new Person({ 119 | // name: 'Jason', 120 | // age: 26 121 | // }); 122 | 123 | // person.save(); 124 | 125 | // const kiwi = new Fruit({ 126 | // name: 'Kiwi', 127 | // score: 10, 128 | // review: 'The best fruit!' 129 | // }); 130 | 131 | // const orange = new Fruit({ 132 | // name: 'Orange', 133 | // score: 4, 134 | // review: 'Too sour for me' 135 | // }); 136 | 137 | // const banana = new Fruit({ 138 | // name: 'Banana', 139 | // score: 3, 140 | // review: 'Weird texture' 141 | // }); 142 | 143 | // Fruit.insertMany([kiwi, orange, banana], function(err){ 144 | // if (err) { 145 | // console.log(err); 146 | // } else { 147 | // console.log('succesfully saved all the fruits to fruitsDB'); 148 | // } 149 | // }); 150 | 151 | // Fruit.find(function(err, fruits){ 152 | // if (err) { 153 | // console.log(err); 154 | // } else { 155 | 156 | // mongoose.connection.close() 157 | 158 | // fruits.forEach(function(fruit){ 159 | // console.log(fruit.name); 160 | // }); 161 | // } 162 | // }); 163 | 164 | // } 165 | 166 | // npm i mongoose 167 | 168 | 169 | 170 | // 338 171 | // const mongoose = require('mongoose'); 172 | 173 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 174 | 175 | // const fruitSchema = new mongoose.Schema ({ 176 | // name: { 177 | // type: String, 178 | // required: [true, 'Please check your data entry, no name specified!'] 179 | // }, 180 | // rating: { 181 | // type: Number, 182 | // min: 1, 183 | // max: 10 184 | // }, 185 | // review: String 186 | // }); 187 | 188 | // const Fruit = mongoose.model('Fruit', fruitSchema); 189 | 190 | // const fruit = new Fruit ({ 191 | // rating: 10, 192 | // review: 'Peaches are so yummy!' 193 | // }); 194 | 195 | // fruit.save(); 196 | 197 | // const findDocuments = function(db, callback) { 198 | 199 | // const collection = db.collection('fruits'); 200 | 201 | // collection.find({}).toArray(function(err, fruits) { 202 | // assert.equal(err, null); 203 | // console.log('Found the following records'); 204 | // console.log(fruits); 205 | // callback(fruits); 206 | // }); 207 | 208 | // const personSchema = new mongoose.Schema ({ 209 | // name: String, 210 | // age: Number 211 | // }); 212 | 213 | // const Person = mongoose.model('Person', personSchema); 214 | 215 | // const person = new Person({ 216 | // name: 'Jason', 217 | // age: 26 218 | // }); 219 | 220 | // // person.save(); 221 | 222 | // Fruit.find(function(err, fruits){ 223 | // if (err) { 224 | // console.log(err); 225 | // } else { 226 | 227 | // mongoose.connection.close() 228 | 229 | // fruits.forEach(function(fruit){ 230 | // console.log(fruit.name); 231 | // }); 232 | // } 233 | // }); 234 | 235 | // } 236 | 237 | // node app.js 238 | 239 | 240 | 241 | // 339 Update 242 | // const mongoose = require('mongoose'); 243 | 244 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 245 | 246 | // const fruitSchema = new mongoose.Schema ({ 247 | // name: { 248 | // type: String, 249 | // required: [true, 'Please check your data entry, no name specified!'] 250 | // }, 251 | // rating: { 252 | // type: Number, 253 | // min: 1, 254 | // max: 10 255 | // }, 256 | // review: String 257 | // }); 258 | 259 | // const Fruit = mongoose.model('Fruit', fruitSchema); 260 | 261 | // const fruit = new Fruit ({ 262 | // rating: 10, 263 | // review: 'Peaches are so yummy!' 264 | // }); 265 | 266 | // // fruit.save(); 267 | 268 | // const findDocuments = function(db, callback) { 269 | 270 | // const collection = db.collection('fruits'); 271 | 272 | // collection.find({}).toArray(function(err, fruits) { 273 | // assert.equal(err, null); 274 | // console.log('Found the following records'); 275 | // console.log(fruits); 276 | // callback(fruits); 277 | // }); 278 | 279 | // const personSchema = new mongoose.Schema ({ 280 | // name: String, 281 | // age: Number 282 | // }); 283 | 284 | // const Person = mongoose.model('Person', personSchema); 285 | 286 | // const person = new Person({ 287 | // name: 'Jason', 288 | // age: 26 289 | // }); 290 | 291 | // // person.save(); 292 | 293 | // Fruit.find(function(err, fruits){ 294 | // if (err) { 295 | // console.log(err); 296 | // } else { 297 | 298 | // mongoose.connection.close() 299 | 300 | // fruits.forEach(function(fruit){ 301 | // console.log(fruit.name); 302 | // }); 303 | // } 304 | // }); 305 | 306 | // Fruit.updateOne({_id: '5bc0854dd6ec7ad010738bc7'}, {name: 'Peach'}, function(err){ 307 | // if (err){ 308 | // console.log(err); 309 | // } else { 310 | // console.log('succesfully updated the document.'); 311 | // } 312 | // }) 313 | 314 | // } 315 | 316 | 317 | 318 | 319 | // 339 DeleteOne 320 | // const mongoose = require('mongoose'); 321 | 322 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 323 | 324 | // const fruitSchema = new mongoose.Schema ({ 325 | // name: { 326 | // type: String, 327 | // required: [true, 'Please check your data entry, no name specified!'] 328 | // }, 329 | // rating: { 330 | // type: Number, 331 | // min: 1, 332 | // max: 10 333 | // }, 334 | // review: String 335 | // }); 336 | 337 | // const Fruit = mongoose.model('Fruit', fruitSchema); 338 | 339 | // const fruit = new Fruit ({ 340 | // rating: 10, 341 | // review: 'Peaches are so yummy!' 342 | // }); 343 | 344 | // // fruit.save(); 345 | 346 | // const findDocuments = function(db, callback) { 347 | 348 | // const collection = db.collection('fruits'); 349 | 350 | // collection.find({}).toArray(function(err, fruits) { 351 | // assert.equal(err, null); 352 | // console.log('Found the following records'); 353 | // console.log(fruits); 354 | // callback(fruits); 355 | // }); 356 | 357 | // const personSchema = new mongoose.Schema ({ 358 | // name: String, 359 | // age: Number 360 | // }); 361 | 362 | // const Person = mongoose.model('Person', personSchema); 363 | 364 | // const person = new Person({ 365 | // name: 'Jason', 366 | // age: 26 367 | // }); 368 | 369 | // // person.save(); 370 | 371 | // Fruit.find(function(err, fruits){ 372 | // if (err) { 373 | // console.log(err); 374 | // } else { 375 | 376 | // mongoose.connection.close() 377 | 378 | // fruits.forEach(function(fruit){ 379 | // console.log(fruit.name); 380 | // }); 381 | // } 382 | // }); 383 | 384 | // Fruit.deleteOne({name: 'Peach'}, function(err){ 385 | // if (err){ 386 | // console.log(err); 387 | // } else { 388 | // console.log('succesfully deleted the document'); 389 | // } 390 | // }) 391 | 392 | // } 393 | 394 | 395 | 396 | // 339 DeleteMany 397 | // const mongoose = require('mongoose'); 398 | 399 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 400 | 401 | // const fruitSchema = new mongoose.Schema ({ 402 | // name: { 403 | // type: String, 404 | // required: [true, 'Please check your data entry, no name specified!'] 405 | // }, 406 | // rating: { 407 | // type: Number, 408 | // min: 1, 409 | // max: 10 410 | // }, 411 | // review: String 412 | // }); 413 | 414 | // const Fruit = mongoose.model('Fruit', fruitSchema); 415 | 416 | // const fruit = new Fruit ({ 417 | // rating: 10, 418 | // review: 'Peaches are so yummy!' 419 | // }); 420 | 421 | // // fruit.save(); 422 | 423 | // const findDocuments = function(db, callback) { 424 | 425 | // const collection = db.collection('fruits'); 426 | 427 | // collection.find({}).toArray(function(err, fruits) { 428 | // assert.equal(err, null); 429 | // console.log('Found the following records'); 430 | // console.log(fruits); 431 | // callback(fruits); 432 | // }); 433 | 434 | // const personSchema = new mongoose.Schema ({ 435 | // name: String, 436 | // age: Number 437 | // }); 438 | 439 | // const Person = mongoose.model('Person', personSchema); 440 | 441 | // const person = new Person({ 442 | // name: 'Jason', 443 | // age: 26 444 | // }); 445 | 446 | // // person.save(); 447 | 448 | // Fruit.find(function(err, fruits){ 449 | // if (err) { 450 | // console.log(err); 451 | // } else { 452 | 453 | // mongoose.connection.close() 454 | 455 | // fruits.forEach(function(fruit){ 456 | // console.log(fruit.name); 457 | // }); 458 | // } 459 | // }); 460 | 461 | // Person.deleteMany({name: 'John'}, function(err){ 462 | // if (err) { 463 | // console.log(err); 464 | // } else { 465 | // console.log('succesfully deleted all the document'); 466 | // } 467 | // }) 468 | 469 | // } 470 | 471 | // node app.js 472 | 473 | 474 | 475 | // 340 Relationships 476 | // const mongoose = require('mongoose'); 477 | 478 | // mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 479 | 480 | // const fruitSchema = new mongoose.Schema ({ 481 | // name: { 482 | // type: String, 483 | // required: [true, 'Please check your data entry, no name specified!'] 484 | // }, 485 | // rating: { 486 | // type: Number, 487 | // min: 1, 488 | // max: 10 489 | // }, 490 | // review: String 491 | // }); 492 | 493 | // const Fruit = mongoose.model('Fruit', fruitSchema); 494 | 495 | // const fruit = new Fruit ({ 496 | // rating: 10, 497 | // review: 'Peaches are so yummy!' 498 | // }); 499 | 500 | // // fruit.save(); 501 | 502 | // const personSchema = new mongoose.Schema ({ 503 | // name: String, 504 | // age: Number, 505 | // favouriteFruit: fruitSchema 506 | // }); 507 | 508 | // const Person = mongoose.model('Person', personSchema); 509 | 510 | // const pineapple = new Fruit({ 511 | // name: 'Pineapple', 512 | // score: 9, 513 | // review: 'Great fruit.' 514 | // }); 515 | 516 | // pineapple.save(); 517 | 518 | // const person = new Person({ 519 | // name: 'Aida', 520 | // age: 23, 521 | // favouriteFruit: pineapple 522 | // }); 523 | 524 | // // person.save(); 525 | 526 | // Fruit.find(function(err, fruits){ 527 | // if (err) { 528 | // console.log(err); 529 | // } else { 530 | 531 | // mongoose.connection.close() 532 | 533 | // fruits.forEach(function(fruit){ 534 | // console.log(fruit.name); 535 | // }); 536 | // } 537 | // }); 538 | 539 | // Person.deleteMany({name: 'John'}, function(err){ 540 | // if (err) { 541 | // console.log(err); 542 | // } else { 543 | // console.log('succesfully deleted all the document'); 544 | // } 545 | // }); 546 | 547 | // node app.js 548 | 549 | 550 | 551 | // 340 Relationships 552 | const mongoose = require('mongoose'); 553 | 554 | mongoose.connect('mongodb://localhost:27017/fruitsDB', { useNewUrlParser: true }); 555 | 556 | const fruitSchema = new mongoose.Schema ({ 557 | name: { 558 | type: String, 559 | required: [true, 'Please check your data entry, no name specified!'] 560 | }, 561 | rating: { 562 | type: Number, 563 | min: 1, 564 | max: 10 565 | }, 566 | review: String 567 | }); 568 | 569 | const Fruit = mongoose.model('Fruit', fruitSchema); 570 | 571 | const fruit = new Fruit ({ 572 | rating: 10, 573 | review: 'Peaches are so yummy!' 574 | }); 575 | 576 | // fruit.save(); 577 | 578 | const personSchema = new mongoose.Schema ({ 579 | name: String, 580 | age: Number, 581 | favouriteFruit: fruitSchema 582 | }); 583 | 584 | const Person = mongoose.model('Person', personSchema); 585 | 586 | const pineapple = new Fruit({ 587 | name: 'Mango', 588 | score: 6, 589 | review: 'Decent fruit.' 590 | }); 591 | 592 | mongo.save(); 593 | 594 | Person.updateOne({name: 'John'}, {favouriteFruit: mango}, function(err){ 595 | if (err) { 596 | console.log(err); 597 | } else { 598 | console.log('succesfully updated the document'); 599 | } 600 | }); 601 | 602 | // const person = new Person({ 603 | // name: 'Aida', 604 | // age: 23, 605 | // favouriteFruit: pineapple 606 | // }); 607 | 608 | // person.save(); 609 | 610 | Fruit.find(function(err, fruits){ 611 | if (err) { 612 | console.log(err); 613 | } else { 614 | 615 | mongoose.connection.close() 616 | 617 | fruits.forEach(function(fruit){ 618 | console.log(fruit.name); 619 | }); 620 | } 621 | }); 622 | 623 | Person.deleteMany({name: 'John'}, function(err){ 624 | if (err) { 625 | console.log(err); 626 | } else { 627 | console.log('succesfully deleted all the document'); 628 | } 629 | }); 630 | 631 | // node app.js -------------------------------------------------------------------------------- /Mongoose/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Mongoose", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "mongoose": "^6.5.3" 9 | } 10 | }, 11 | "node_modules/@types/node": { 12 | "version": "18.7.13", 13 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 14 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 15 | }, 16 | "node_modules/@types/webidl-conversions": { 17 | "version": "6.1.1", 18 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 19 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 20 | }, 21 | "node_modules/@types/whatwg-url": { 22 | "version": "8.2.2", 23 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 24 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 25 | "dependencies": { 26 | "@types/node": "*", 27 | "@types/webidl-conversions": "*" 28 | } 29 | }, 30 | "node_modules/base64-js": { 31 | "version": "1.5.1", 32 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 33 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 34 | "funding": [ 35 | { 36 | "type": "github", 37 | "url": "https://github.com/sponsors/feross" 38 | }, 39 | { 40 | "type": "patreon", 41 | "url": "https://www.patreon.com/feross" 42 | }, 43 | { 44 | "type": "consulting", 45 | "url": "https://feross.org/support" 46 | } 47 | ] 48 | }, 49 | "node_modules/bson": { 50 | "version": "4.7.0", 51 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 52 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 53 | "dependencies": { 54 | "buffer": "^5.6.0" 55 | }, 56 | "engines": { 57 | "node": ">=6.9.0" 58 | } 59 | }, 60 | "node_modules/buffer": { 61 | "version": "5.7.1", 62 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 63 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 64 | "funding": [ 65 | { 66 | "type": "github", 67 | "url": "https://github.com/sponsors/feross" 68 | }, 69 | { 70 | "type": "patreon", 71 | "url": "https://www.patreon.com/feross" 72 | }, 73 | { 74 | "type": "consulting", 75 | "url": "https://feross.org/support" 76 | } 77 | ], 78 | "dependencies": { 79 | "base64-js": "^1.3.1", 80 | "ieee754": "^1.1.13" 81 | } 82 | }, 83 | "node_modules/debug": { 84 | "version": "4.3.4", 85 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 86 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 87 | "dependencies": { 88 | "ms": "2.1.2" 89 | }, 90 | "engines": { 91 | "node": ">=6.0" 92 | }, 93 | "peerDependenciesMeta": { 94 | "supports-color": { 95 | "optional": true 96 | } 97 | } 98 | }, 99 | "node_modules/debug/node_modules/ms": { 100 | "version": "2.1.2", 101 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 102 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 103 | }, 104 | "node_modules/denque": { 105 | "version": "2.1.0", 106 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 107 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 108 | "engines": { 109 | "node": ">=0.10" 110 | } 111 | }, 112 | "node_modules/ieee754": { 113 | "version": "1.2.1", 114 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 115 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 116 | "funding": [ 117 | { 118 | "type": "github", 119 | "url": "https://github.com/sponsors/feross" 120 | }, 121 | { 122 | "type": "patreon", 123 | "url": "https://www.patreon.com/feross" 124 | }, 125 | { 126 | "type": "consulting", 127 | "url": "https://feross.org/support" 128 | } 129 | ] 130 | }, 131 | "node_modules/ip": { 132 | "version": "2.0.0", 133 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 134 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 135 | }, 136 | "node_modules/kareem": { 137 | "version": "2.4.1", 138 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 139 | "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 140 | }, 141 | "node_modules/memory-pager": { 142 | "version": "1.5.0", 143 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 144 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 145 | "optional": true 146 | }, 147 | "node_modules/mongodb": { 148 | "version": "4.8.1", 149 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", 150 | "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", 151 | "dependencies": { 152 | "bson": "^4.6.5", 153 | "denque": "^2.0.1", 154 | "mongodb-connection-string-url": "^2.5.2", 155 | "socks": "^2.6.2" 156 | }, 157 | "engines": { 158 | "node": ">=12.9.0" 159 | }, 160 | "optionalDependencies": { 161 | "saslprep": "^1.0.3" 162 | } 163 | }, 164 | "node_modules/mongodb-connection-string-url": { 165 | "version": "2.5.3", 166 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 167 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 168 | "dependencies": { 169 | "@types/whatwg-url": "^8.2.1", 170 | "whatwg-url": "^11.0.0" 171 | } 172 | }, 173 | "node_modules/mongoose": { 174 | "version": "6.5.3", 175 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.3.tgz", 176 | "integrity": "sha512-0L2ZOPzNQ7kcIgpdfpmVXc+/SypdhzcTlaHXYa983u1lrVp7/i3ekwHpPiTXxYBvV6FwBAsFoHI7+Ovf8tp3Mg==", 177 | "dependencies": { 178 | "bson": "^4.6.5", 179 | "kareem": "2.4.1", 180 | "mongodb": "4.8.1", 181 | "mpath": "0.9.0", 182 | "mquery": "4.0.3", 183 | "ms": "2.1.3", 184 | "sift": "16.0.0" 185 | }, 186 | "engines": { 187 | "node": ">=12.0.0" 188 | }, 189 | "funding": { 190 | "type": "opencollective", 191 | "url": "https://opencollective.com/mongoose" 192 | } 193 | }, 194 | "node_modules/mpath": { 195 | "version": "0.9.0", 196 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 197 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", 198 | "engines": { 199 | "node": ">=4.0.0" 200 | } 201 | }, 202 | "node_modules/mquery": { 203 | "version": "4.0.3", 204 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", 205 | "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", 206 | "dependencies": { 207 | "debug": "4.x" 208 | }, 209 | "engines": { 210 | "node": ">=12.0.0" 211 | } 212 | }, 213 | "node_modules/ms": { 214 | "version": "2.1.3", 215 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 216 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 217 | }, 218 | "node_modules/punycode": { 219 | "version": "2.1.1", 220 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 221 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 222 | "engines": { 223 | "node": ">=6" 224 | } 225 | }, 226 | "node_modules/saslprep": { 227 | "version": "1.0.3", 228 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 229 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 230 | "optional": true, 231 | "dependencies": { 232 | "sparse-bitfield": "^3.0.3" 233 | }, 234 | "engines": { 235 | "node": ">=6" 236 | } 237 | }, 238 | "node_modules/sift": { 239 | "version": "16.0.0", 240 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", 241 | "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" 242 | }, 243 | "node_modules/smart-buffer": { 244 | "version": "4.2.0", 245 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 246 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", 247 | "engines": { 248 | "node": ">= 6.0.0", 249 | "npm": ">= 3.0.0" 250 | } 251 | }, 252 | "node_modules/socks": { 253 | "version": "2.7.0", 254 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 255 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 256 | "dependencies": { 257 | "ip": "^2.0.0", 258 | "smart-buffer": "^4.2.0" 259 | }, 260 | "engines": { 261 | "node": ">= 10.13.0", 262 | "npm": ">= 3.0.0" 263 | } 264 | }, 265 | "node_modules/sparse-bitfield": { 266 | "version": "3.0.3", 267 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 268 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 269 | "optional": true, 270 | "dependencies": { 271 | "memory-pager": "^1.0.2" 272 | } 273 | }, 274 | "node_modules/tr46": { 275 | "version": "3.0.0", 276 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 277 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 278 | "dependencies": { 279 | "punycode": "^2.1.1" 280 | }, 281 | "engines": { 282 | "node": ">=12" 283 | } 284 | }, 285 | "node_modules/webidl-conversions": { 286 | "version": "7.0.0", 287 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 288 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 289 | "engines": { 290 | "node": ">=12" 291 | } 292 | }, 293 | "node_modules/whatwg-url": { 294 | "version": "11.0.0", 295 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 296 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 297 | "dependencies": { 298 | "tr46": "^3.0.0", 299 | "webidl-conversions": "^7.0.0" 300 | }, 301 | "engines": { 302 | "node": ">=12" 303 | } 304 | } 305 | }, 306 | "dependencies": { 307 | "@types/node": { 308 | "version": "18.7.13", 309 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", 310 | "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" 311 | }, 312 | "@types/webidl-conversions": { 313 | "version": "6.1.1", 314 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 315 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 316 | }, 317 | "@types/whatwg-url": { 318 | "version": "8.2.2", 319 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 320 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 321 | "requires": { 322 | "@types/node": "*", 323 | "@types/webidl-conversions": "*" 324 | } 325 | }, 326 | "base64-js": { 327 | "version": "1.5.1", 328 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 329 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 330 | }, 331 | "bson": { 332 | "version": "4.7.0", 333 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", 334 | "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", 335 | "requires": { 336 | "buffer": "^5.6.0" 337 | } 338 | }, 339 | "buffer": { 340 | "version": "5.7.1", 341 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 342 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 343 | "requires": { 344 | "base64-js": "^1.3.1", 345 | "ieee754": "^1.1.13" 346 | } 347 | }, 348 | "debug": { 349 | "version": "4.3.4", 350 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 351 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 352 | "requires": { 353 | "ms": "2.1.2" 354 | }, 355 | "dependencies": { 356 | "ms": { 357 | "version": "2.1.2", 358 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 359 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 360 | } 361 | } 362 | }, 363 | "denque": { 364 | "version": "2.1.0", 365 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 366 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" 367 | }, 368 | "ieee754": { 369 | "version": "1.2.1", 370 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 371 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 372 | }, 373 | "ip": { 374 | "version": "2.0.0", 375 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 376 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 377 | }, 378 | "kareem": { 379 | "version": "2.4.1", 380 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 381 | "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 382 | }, 383 | "memory-pager": { 384 | "version": "1.5.0", 385 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 386 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 387 | "optional": true 388 | }, 389 | "mongodb": { 390 | "version": "4.8.1", 391 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", 392 | "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", 393 | "requires": { 394 | "bson": "^4.6.5", 395 | "denque": "^2.0.1", 396 | "mongodb-connection-string-url": "^2.5.2", 397 | "saslprep": "^1.0.3", 398 | "socks": "^2.6.2" 399 | } 400 | }, 401 | "mongodb-connection-string-url": { 402 | "version": "2.5.3", 403 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 404 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 405 | "requires": { 406 | "@types/whatwg-url": "^8.2.1", 407 | "whatwg-url": "^11.0.0" 408 | } 409 | }, 410 | "mongoose": { 411 | "version": "6.5.3", 412 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.3.tgz", 413 | "integrity": "sha512-0L2ZOPzNQ7kcIgpdfpmVXc+/SypdhzcTlaHXYa983u1lrVp7/i3ekwHpPiTXxYBvV6FwBAsFoHI7+Ovf8tp3Mg==", 414 | "requires": { 415 | "bson": "^4.6.5", 416 | "kareem": "2.4.1", 417 | "mongodb": "4.8.1", 418 | "mpath": "0.9.0", 419 | "mquery": "4.0.3", 420 | "ms": "2.1.3", 421 | "sift": "16.0.0" 422 | } 423 | }, 424 | "mpath": { 425 | "version": "0.9.0", 426 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 427 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" 428 | }, 429 | "mquery": { 430 | "version": "4.0.3", 431 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", 432 | "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", 433 | "requires": { 434 | "debug": "4.x" 435 | } 436 | }, 437 | "ms": { 438 | "version": "2.1.3", 439 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 440 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 441 | }, 442 | "punycode": { 443 | "version": "2.1.1", 444 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 445 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 446 | }, 447 | "saslprep": { 448 | "version": "1.0.3", 449 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 450 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 451 | "optional": true, 452 | "requires": { 453 | "sparse-bitfield": "^3.0.3" 454 | } 455 | }, 456 | "sift": { 457 | "version": "16.0.0", 458 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", 459 | "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" 460 | }, 461 | "smart-buffer": { 462 | "version": "4.2.0", 463 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 464 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" 465 | }, 466 | "socks": { 467 | "version": "2.7.0", 468 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 469 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 470 | "requires": { 471 | "ip": "^2.0.0", 472 | "smart-buffer": "^4.2.0" 473 | } 474 | }, 475 | "sparse-bitfield": { 476 | "version": "3.0.3", 477 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 478 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 479 | "optional": true, 480 | "requires": { 481 | "memory-pager": "^1.0.2" 482 | } 483 | }, 484 | "tr46": { 485 | "version": "3.0.0", 486 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 487 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 488 | "requires": { 489 | "punycode": "^2.1.1" 490 | } 491 | }, 492 | "webidl-conversions": { 493 | "version": "7.0.0", 494 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 495 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" 496 | }, 497 | "whatwg-url": { 498 | "version": "11.0.0", 499 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 500 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 501 | "requires": { 502 | "tr46": "^3.0.0", 503 | "webidl-conversions": "^7.0.0" 504 | } 505 | } 506 | } 507 | } 508 | --------------------------------------------------------------------------------