├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── collections ├── README.md ├── examples.json ├── recipes.json └── users.json ├── lessons ├── 1.2 │ └── README.md ├── 1.3 │ └── README.md ├── 1.4 │ └── README.md ├── 1.6 │ └── README.md ├── 1.7 │ └── README.md ├── 2.1 │ ├── ASSESSMENT.md │ ├── README.md │ └── recipe.json ├── 2.2 │ ├── ASSESSMENT.md │ └── README.md ├── 2.3 │ ├── ASSESSMENT.md │ ├── README.md │ ├── directions.json │ └── ingredients.json ├── 2.4 │ ├── ASSESSMENT.md │ └── README.md ├── 2.6 │ └── example.json ├── 3.1 │ ├── ASSESSMENT.md │ └── README.md ├── 3.2 │ ├── ASSESSMENT.md │ └── README.md ├── 3.3 │ ├── ASSESSMENT.md │ └── README.md ├── 3.4 │ ├── ASSESSMENT.md │ └── README.md ├── 3.5 │ └── README.md ├── 3.6 │ └── README.md ├── 3.7 │ └── README.md ├── 3.8 │ └── README.md ├── 4.1 │ ├── ASSESSMENT.md │ └── README.md ├── 4.2 │ ├── ASSESSMENT.md │ └── README.md ├── 4.3 │ └── README.md ├── 4.4 │ ├── ADDRESSES.csv │ ├── BACKERS.csv │ ├── README.md │ └── REWARDS.csv ├── 4.5 │ └── solution.json ├── 5.1 │ ├── 1-test.py │ ├── 2-find_one.py │ ├── 3-find.py │ ├── 4-find-sorted-limited.py │ ├── 5-recipe-search.py │ └── README.md ├── 5.2 │ ├── 1-test.js │ ├── 2-find_one.js │ ├── 3-find.js │ ├── 4-find-sorted-limted.js │ ├── 5-recipe-search.js │ ├── README.md │ ├── package-lock.json │ └── package.json ├── 5.3 │ ├── 1-test.php │ ├── 2-find_one.php │ ├── 3-find.php │ ├── 4-find-sorted-limited.php │ ├── 5-recipe-search.php │ ├── README.md │ ├── composer.json │ ├── composer.lock │ ├── inc │ │ ├── footer.php │ │ └── header.php │ ├── index.php │ ├── info.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_files.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ │ └── mongodb │ │ └── mongodb │ │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ └── bug-report.md │ │ ├── .gitignore │ │ ├── .phpcs │ │ └── autoload.php │ │ ├── .travis.yml │ │ ├── .travis │ │ ├── debug-core.sh │ │ ├── install-extension.sh │ │ ├── mo.sh │ │ └── setup_mo.sh │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── composer.json │ │ ├── docs │ │ ├── .static │ │ │ └── .mongodb │ │ ├── includes │ │ │ ├── apiargs-MongoDBClient-common-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-construct-driverOptions.yaml │ │ │ ├── apiargs-MongoDBClient-method-construct-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-createClientEncryption-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-dropDatabase-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-dropDatabase-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-get-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-listDatabases-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-listDatabases-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-selectCollection-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-selectCollection-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-selectDatabase-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-selectDatabase-param.yaml │ │ │ ├── apiargs-MongoDBClient-method-watch-option.yaml │ │ │ ├── apiargs-MongoDBClient-method-watch-param.yaml │ │ │ ├── apiargs-MongoDBCollection-common-option.yaml │ │ │ ├── apiargs-MongoDBCollection-common-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-aggregate-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-aggregate-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-bulkWrite-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-bulkWrite-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-construct-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-construct-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-count-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-count-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-countDocuments-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-countDocuments-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-createIndex-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-createIndex-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-createIndexes-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-createIndexes-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-deleteMany-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-deleteMany-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-deleteOne-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-deleteOne-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-distinct-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-distinct-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-drop-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-drop-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-dropIndex-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-dropIndex-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-dropIndexes-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-dropIndexes-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-explain-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-explain-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-find-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-find-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOne-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOne-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-insertMany-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-insertMany-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-insertOne-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-insertOne-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-listIndexes-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-listIndexes-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-mapReduce-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-mapReduce-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-replaceOne-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-replaceOne-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-updateMany-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-updateMany-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-updateOne-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-updateOne-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-watch-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-watch-param.yaml │ │ │ ├── apiargs-MongoDBCollection-method-withOptions-option.yaml │ │ │ ├── apiargs-MongoDBCollection-method-withOptions-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-common-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-aggregate-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-aggregate-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-command-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-command-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-construct-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-construct-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-createCollection-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-createCollection-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-drop-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-drop-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-dropCollection-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-dropCollection-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-get-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-listCollections-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-listCollections-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-modifyCollection-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-modifyCollection-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-selectCollection-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-selectCollection-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-watch-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-watch-param.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-withOptions-option.yaml │ │ │ ├── apiargs-MongoDBDatabase-method-withOptions-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-common-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-common-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-construct-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-construct-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-delete-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-find-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-findOne-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-rename-param.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml │ │ │ ├── apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml │ │ │ ├── apiargs-aggregate-option.yaml │ │ │ ├── apiargs-common-option.yaml │ │ │ ├── apiargs-common-param.yaml │ │ │ ├── apiargs-function-with_transaction-param.yaml │ │ │ ├── apiargs-method-watch-option.yaml │ │ │ ├── apiargs-method-watch-param.yaml │ │ │ ├── extracts-bulkwriteexception.yaml │ │ │ ├── extracts-error.yaml │ │ │ └── extracts-note.yaml │ │ ├── index.txt │ │ ├── pretty.js │ │ ├── reference.txt │ │ ├── reference │ │ │ ├── bson.txt │ │ │ ├── class │ │ │ │ ├── MongoDBClient.txt │ │ │ │ ├── MongoDBCollection.txt │ │ │ │ ├── MongoDBDatabase.txt │ │ │ │ └── MongoDBGridFSBucket.txt │ │ │ ├── enumeration-classes.txt │ │ │ ├── exception-classes.txt │ │ │ ├── function │ │ │ │ └── with_transaction.txt │ │ │ ├── functions.txt │ │ │ ├── method │ │ │ │ ├── MongoDBBulkWriteResult-getDeletedCount.txt │ │ │ │ ├── MongoDBBulkWriteResult-getInsertedCount.txt │ │ │ │ ├── MongoDBBulkWriteResult-getInsertedIds.txt │ │ │ │ ├── MongoDBBulkWriteResult-getMatchedCount.txt │ │ │ │ ├── MongoDBBulkWriteResult-getModifiedCount.txt │ │ │ │ ├── MongoDBBulkWriteResult-getUpsertedCount.txt │ │ │ │ ├── MongoDBBulkWriteResult-getUpsertedIds.txt │ │ │ │ ├── MongoDBBulkWriteResult-isAcknowledged.txt │ │ │ │ ├── MongoDBChangeStream-current.txt │ │ │ │ ├── MongoDBChangeStream-getCursorId.txt │ │ │ │ ├── MongoDBChangeStream-getResumeToken.txt │ │ │ │ ├── MongoDBChangeStream-key.txt │ │ │ │ ├── MongoDBChangeStream-next.txt │ │ │ │ ├── MongoDBChangeStream-rewind.txt │ │ │ │ ├── MongoDBChangeStream-valid.txt │ │ │ │ ├── MongoDBClient-createClientEncryption.txt │ │ │ │ ├── MongoDBClient-dropDatabase.txt │ │ │ │ ├── MongoDBClient-getManager.txt │ │ │ │ ├── MongoDBClient-getReadConcern.txt │ │ │ │ ├── MongoDBClient-getReadPreference.txt │ │ │ │ ├── MongoDBClient-getTypeMap.txt │ │ │ │ ├── MongoDBClient-getWriteConcern.txt │ │ │ │ ├── MongoDBClient-listDatabases.txt │ │ │ │ ├── MongoDBClient-selectCollection.txt │ │ │ │ ├── MongoDBClient-selectDatabase.txt │ │ │ │ ├── MongoDBClient-startSession.txt │ │ │ │ ├── MongoDBClient-watch.txt │ │ │ │ ├── MongoDBClient__construct.txt │ │ │ │ ├── MongoDBClient__get.txt │ │ │ │ ├── MongoDBCollection-aggregate.txt │ │ │ │ ├── MongoDBCollection-bulkWrite.txt │ │ │ │ ├── MongoDBCollection-count.txt │ │ │ │ ├── MongoDBCollection-countDocuments.txt │ │ │ │ ├── MongoDBCollection-createIndex.txt │ │ │ │ ├── MongoDBCollection-createIndexes.txt │ │ │ │ ├── MongoDBCollection-deleteMany.txt │ │ │ │ ├── MongoDBCollection-deleteOne.txt │ │ │ │ ├── MongoDBCollection-distinct.txt │ │ │ │ ├── MongoDBCollection-drop.txt │ │ │ │ ├── MongoDBCollection-dropIndex.txt │ │ │ │ ├── MongoDBCollection-dropIndexes.txt │ │ │ │ ├── MongoDBCollection-estimatedDocumentCount.txt │ │ │ │ ├── MongoDBCollection-explain.txt │ │ │ │ ├── MongoDBCollection-find.txt │ │ │ │ ├── MongoDBCollection-findOne.txt │ │ │ │ ├── MongoDBCollection-findOneAndDelete.txt │ │ │ │ ├── MongoDBCollection-findOneAndReplace.txt │ │ │ │ ├── MongoDBCollection-findOneAndUpdate.txt │ │ │ │ ├── MongoDBCollection-getCollectionName.txt │ │ │ │ ├── MongoDBCollection-getDatabaseName.txt │ │ │ │ ├── MongoDBCollection-getManager.txt │ │ │ │ ├── MongoDBCollection-getNamespace.txt │ │ │ │ ├── MongoDBCollection-getReadConcern.txt │ │ │ │ ├── MongoDBCollection-getReadPreference.txt │ │ │ │ ├── MongoDBCollection-getTypeMap.txt │ │ │ │ ├── MongoDBCollection-getWriteConcern.txt │ │ │ │ ├── MongoDBCollection-insertMany.txt │ │ │ │ ├── MongoDBCollection-insertOne.txt │ │ │ │ ├── MongoDBCollection-listIndexes.txt │ │ │ │ ├── MongoDBCollection-mapReduce.txt │ │ │ │ ├── MongoDBCollection-replaceOne.txt │ │ │ │ ├── MongoDBCollection-updateMany.txt │ │ │ │ ├── MongoDBCollection-updateOne.txt │ │ │ │ ├── MongoDBCollection-watch.txt │ │ │ │ ├── MongoDBCollection-withOptions.txt │ │ │ │ ├── MongoDBCollection__construct.txt │ │ │ │ ├── MongoDBDatabase-aggregate.txt │ │ │ │ ├── MongoDBDatabase-command.txt │ │ │ │ ├── MongoDBDatabase-createCollection.txt │ │ │ │ ├── MongoDBDatabase-drop.txt │ │ │ │ ├── MongoDBDatabase-dropCollection.txt │ │ │ │ ├── MongoDBDatabase-getDatabaseName.txt │ │ │ │ ├── MongoDBDatabase-getManager.txt │ │ │ │ ├── MongoDBDatabase-getReadConcern.txt │ │ │ │ ├── MongoDBDatabase-getReadPreference.txt │ │ │ │ ├── MongoDBDatabase-getTypeMap.txt │ │ │ │ ├── MongoDBDatabase-getWriteConcern.txt │ │ │ │ ├── MongoDBDatabase-listCollections.txt │ │ │ │ ├── MongoDBDatabase-modifyCollection.txt │ │ │ │ ├── MongoDBDatabase-selectCollection.txt │ │ │ │ ├── MongoDBDatabase-selectGridFSBucket.txt │ │ │ │ ├── MongoDBDatabase-watch.txt │ │ │ │ ├── MongoDBDatabase-withOptions.txt │ │ │ │ ├── MongoDBDatabase__construct.txt │ │ │ │ ├── MongoDBDatabase__get.txt │ │ │ │ ├── MongoDBDeleteResult-getDeletedCount.txt │ │ │ │ ├── MongoDBDeleteResult-isAcknowledged.txt │ │ │ │ ├── MongoDBGridFSBucket-delete.txt │ │ │ │ ├── MongoDBGridFSBucket-downloadToStream.txt │ │ │ │ ├── MongoDBGridFSBucket-downloadToStreamByName.txt │ │ │ │ ├── MongoDBGridFSBucket-drop.txt │ │ │ │ ├── MongoDBGridFSBucket-find.txt │ │ │ │ ├── MongoDBGridFSBucket-findOne.txt │ │ │ │ ├── MongoDBGridFSBucket-getBucketName.txt │ │ │ │ ├── MongoDBGridFSBucket-getChunkSizeBytes.txt │ │ │ │ ├── MongoDBGridFSBucket-getChunksCollection.txt │ │ │ │ ├── MongoDBGridFSBucket-getDatabaseName.txt │ │ │ │ ├── MongoDBGridFSBucket-getFileDocumentForStream.txt │ │ │ │ ├── MongoDBGridFSBucket-getFileIdForStream.txt │ │ │ │ ├── MongoDBGridFSBucket-getFilesCollection.txt │ │ │ │ ├── MongoDBGridFSBucket-getReadConcern.txt │ │ │ │ ├── MongoDBGridFSBucket-getReadPreference.txt │ │ │ │ ├── MongoDBGridFSBucket-getTypeMap.txt │ │ │ │ ├── MongoDBGridFSBucket-getWriteConcern.txt │ │ │ │ ├── MongoDBGridFSBucket-openDownloadStream.txt │ │ │ │ ├── MongoDBGridFSBucket-openDownloadStreamByName.txt │ │ │ │ ├── MongoDBGridFSBucket-openUploadStream.txt │ │ │ │ ├── MongoDBGridFSBucket-rename.txt │ │ │ │ ├── MongoDBGridFSBucket-uploadFromStream.txt │ │ │ │ ├── MongoDBGridFSBucket__construct.txt │ │ │ │ ├── MongoDBInsertManyResult-getInsertedCount.txt │ │ │ │ ├── MongoDBInsertManyResult-getInsertedIds.txt │ │ │ │ ├── MongoDBInsertManyResult-isAcknowledged.txt │ │ │ │ ├── MongoDBInsertOneResult-getInsertedCount.txt │ │ │ │ ├── MongoDBInsertOneResult-getInsertedId.txt │ │ │ │ ├── MongoDBInsertOneResult-isAcknowledged.txt │ │ │ │ ├── MongoDBMapReduceResult-getCounts.txt │ │ │ │ ├── MongoDBMapReduceResult-getExecutionTimeMS.txt │ │ │ │ ├── MongoDBMapReduceResult-getIterator.txt │ │ │ │ ├── MongoDBMapReduceResult-getTiming.txt │ │ │ │ ├── MongoDBModelCollectionInfo-getCappedMax.txt │ │ │ │ ├── MongoDBModelCollectionInfo-getCappedSize.txt │ │ │ │ ├── MongoDBModelCollectionInfo-getName.txt │ │ │ │ ├── MongoDBModelCollectionInfo-getOptions.txt │ │ │ │ ├── MongoDBModelCollectionInfo-isCapped.txt │ │ │ │ ├── MongoDBModelDatabaseInfo-getName.txt │ │ │ │ ├── MongoDBModelDatabaseInfo-getSizeOnDisk.txt │ │ │ │ ├── MongoDBModelDatabaseInfo-isEmpty.txt │ │ │ │ ├── MongoDBModelIndexInfo-getKey.txt │ │ │ │ ├── MongoDBModelIndexInfo-getName.txt │ │ │ │ ├── MongoDBModelIndexInfo-getNamespace.txt │ │ │ │ ├── MongoDBModelIndexInfo-getVersion.txt │ │ │ │ ├── MongoDBModelIndexInfo-is2dSphere.txt │ │ │ │ ├── MongoDBModelIndexInfo-isGeoHaystack.txt │ │ │ │ ├── MongoDBModelIndexInfo-isSparse.txt │ │ │ │ ├── MongoDBModelIndexInfo-isText.txt │ │ │ │ ├── MongoDBModelIndexInfo-isTtl.txt │ │ │ │ ├── MongoDBModelIndexInfo-isUnique.txt │ │ │ │ ├── MongoDBUpdateResult-getMatchedCount.txt │ │ │ │ ├── MongoDBUpdateResult-getModifiedCount.txt │ │ │ │ ├── MongoDBUpdateResult-getUpsertedCount.txt │ │ │ │ ├── MongoDBUpdateResult-getUpsertedId.txt │ │ │ │ └── MongoDBUpdateResult-isAcknowledged.txt │ │ │ ├── result-classes.txt │ │ │ └── write-result-classes.txt │ │ ├── tutorial.txt │ │ ├── tutorial │ │ │ ├── client-side-encryption.txt │ │ │ ├── collation.txt │ │ │ ├── commands.txt │ │ │ ├── crud.txt │ │ │ ├── custom-types.txt │ │ │ ├── decimal128.txt │ │ │ ├── example-data.txt │ │ │ ├── gridfs.txt │ │ │ ├── indexes.txt │ │ │ ├── install-php-library.txt │ │ │ └── tailable-cursor.txt │ │ └── upgrade.txt │ │ ├── mongo-orchestration │ │ ├── replica_sets │ │ │ ├── replicaset-old.json │ │ │ ├── replicaset-one-node.json │ │ │ └── replicaset.json │ │ ├── sharded_clusters │ │ │ ├── cluster.json │ │ │ └── cluster_replset.json │ │ ├── ssl │ │ │ ├── ca.pem │ │ │ ├── client.pem │ │ │ ├── crl.pem │ │ │ └── server.pem │ │ └── standalone │ │ │ ├── standalone-auth.json │ │ │ ├── standalone-old.json │ │ │ ├── standalone-ssl.json │ │ │ └── standalone.json │ │ ├── phpcs.xml.dist │ │ ├── phpunit.xml.dist │ │ ├── src │ │ ├── BulkWriteResult.php │ │ ├── ChangeStream.php │ │ ├── Client.php │ │ ├── Collection.php │ │ ├── Database.php │ │ ├── DeleteResult.php │ │ ├── Exception │ │ │ ├── BadMethodCallException.php │ │ │ ├── Exception.php │ │ │ ├── InvalidArgumentException.php │ │ │ ├── ResumeTokenException.php │ │ │ ├── RuntimeException.php │ │ │ ├── UnexpectedValueException.php │ │ │ └── UnsupportedException.php │ │ ├── GridFS │ │ │ ├── Bucket.php │ │ │ ├── CollectionWrapper.php │ │ │ ├── Exception │ │ │ │ ├── CorruptFileException.php │ │ │ │ └── FileNotFoundException.php │ │ │ ├── ReadableStream.php │ │ │ ├── StreamWrapper.php │ │ │ └── WritableStream.php │ │ ├── InsertManyResult.php │ │ ├── InsertOneResult.php │ │ ├── MapReduceResult.php │ │ ├── Model │ │ │ ├── BSONArray.php │ │ │ ├── BSONDocument.php │ │ │ ├── BSONIterator.php │ │ │ ├── CachingIterator.php │ │ │ ├── ChangeStreamIterator.php │ │ │ ├── CollectionInfo.php │ │ │ ├── CollectionInfoCommandIterator.php │ │ │ ├── CollectionInfoIterator.php │ │ │ ├── DatabaseInfo.php │ │ │ ├── DatabaseInfoIterator.php │ │ │ ├── DatabaseInfoLegacyIterator.php │ │ │ ├── IndexInfo.php │ │ │ ├── IndexInfoIterator.php │ │ │ ├── IndexInfoIteratorIterator.php │ │ │ └── IndexInput.php │ │ ├── Operation │ │ │ ├── Aggregate.php │ │ │ ├── BulkWrite.php │ │ │ ├── Count.php │ │ │ ├── CountDocuments.php │ │ │ ├── CreateCollection.php │ │ │ ├── CreateIndexes.php │ │ │ ├── DatabaseCommand.php │ │ │ ├── Delete.php │ │ │ ├── DeleteMany.php │ │ │ ├── DeleteOne.php │ │ │ ├── Distinct.php │ │ │ ├── DropCollection.php │ │ │ ├── DropDatabase.php │ │ │ ├── DropIndexes.php │ │ │ ├── EstimatedDocumentCount.php │ │ │ ├── Executable.php │ │ │ ├── Explain.php │ │ │ ├── Explainable.php │ │ │ ├── Find.php │ │ │ ├── FindAndModify.php │ │ │ ├── FindOne.php │ │ │ ├── FindOneAndDelete.php │ │ │ ├── FindOneAndReplace.php │ │ │ ├── FindOneAndUpdate.php │ │ │ ├── InsertMany.php │ │ │ ├── InsertOne.php │ │ │ ├── ListCollections.php │ │ │ ├── ListDatabases.php │ │ │ ├── ListIndexes.php │ │ │ ├── MapReduce.php │ │ │ ├── ModifyCollection.php │ │ │ ├── ReplaceOne.php │ │ │ ├── Update.php │ │ │ ├── UpdateMany.php │ │ │ ├── UpdateOne.php │ │ │ ├── Watch.php │ │ │ └── WithTransaction.php │ │ ├── UpdateResult.php │ │ └── functions.php │ │ └── tests │ │ ├── ClientFunctionalTest.php │ │ ├── ClientTest.php │ │ ├── Collection │ │ ├── CollectionFunctionalTest.php │ │ ├── CrudSpecFunctionalTest.php │ │ ├── FunctionalTestCase.php │ │ └── spec-tests │ │ │ ├── read │ │ │ ├── aggregate-collation.json │ │ │ ├── aggregate-out.json │ │ │ ├── aggregate.json │ │ │ ├── count-collation.json │ │ │ ├── count-empty.json │ │ │ ├── count.json │ │ │ ├── distinct-collation.json │ │ │ ├── distinct.json │ │ │ ├── find-collation.json │ │ │ └── find.json │ │ │ └── write │ │ │ ├── bulkWrite-arrayFilters.json │ │ │ ├── bulkWrite-collation.json │ │ │ ├── bulkWrite.json │ │ │ ├── deleteMany-collation.json │ │ │ ├── deleteMany.json │ │ │ ├── deleteOne-collation.json │ │ │ ├── deleteOne.json │ │ │ ├── findOneAndDelete-collation.json │ │ │ ├── findOneAndDelete.json │ │ │ ├── findOneAndReplace-collation.json │ │ │ ├── findOneAndReplace-upsert.json │ │ │ ├── findOneAndReplace.json │ │ │ ├── findOneAndUpdate-arrayFilters.json │ │ │ ├── findOneAndUpdate-collation.json │ │ │ ├── findOneAndUpdate.json │ │ │ ├── insertMany.json │ │ │ ├── insertOne.json │ │ │ ├── replaceOne-collation.json │ │ │ ├── replaceOne.json │ │ │ ├── updateMany-arrayFilters.json │ │ │ ├── updateMany-collation.json │ │ │ ├── updateMany.json │ │ │ ├── updateOne-arrayFilters.json │ │ │ ├── updateOne-collation.json │ │ │ └── updateOne.json │ │ ├── CommandObserver.php │ │ ├── Compat │ │ └── PolyfillAssertTrait.php │ │ ├── Database │ │ ├── CollectionManagementFunctionalTest.php │ │ ├── DatabaseFunctionalTest.php │ │ └── FunctionalTestCase.php │ │ ├── DocumentationExamplesTest.php │ │ ├── FunctionalTestCase.php │ │ ├── FunctionsTest.php │ │ ├── GridFS │ │ ├── BucketFunctionalTest.php │ │ ├── FunctionalTestCase.php │ │ ├── ReadableStreamFunctionalTest.php │ │ ├── SpecFunctionalTest.php │ │ ├── StreamWrapperFunctionalTest.php │ │ ├── WritableStreamFunctionalTest.php │ │ └── spec-tests │ │ │ ├── delete.json │ │ │ ├── download.json │ │ │ ├── download_by_name.json │ │ │ └── upload.json │ │ ├── Model │ │ ├── BSONArrayTest.php │ │ ├── BSONDocumentTest.php │ │ ├── BSONIteratorTest.php │ │ ├── CachingIteratorTest.php │ │ ├── ChangeStreamIteratorTest.php │ │ ├── CollectionInfoTest.php │ │ ├── DatabaseInfoTest.php │ │ ├── IndexInfoFunctionalTest.php │ │ ├── IndexInfoTest.php │ │ ├── IndexInputTest.php │ │ └── UncloneableObject.php │ │ ├── Operation │ │ ├── AggregateFunctionalTest.php │ │ ├── AggregateTest.php │ │ ├── BulkWriteFunctionalTest.php │ │ ├── BulkWriteTest.php │ │ ├── CountDocumentsFunctionalTest.php │ │ ├── CountDocumentsTest.php │ │ ├── CountFunctionalTest.php │ │ ├── CountTest.php │ │ ├── CreateCollectionFunctionalTest.php │ │ ├── CreateCollectionTest.php │ │ ├── CreateIndexesFunctionalTest.php │ │ ├── CreateIndexesTest.php │ │ ├── DatabaseCommandFunctionalTest.php │ │ ├── DatabaseCommandTest.php │ │ ├── DeleteFunctionalTest.php │ │ ├── DeleteTest.php │ │ ├── DistinctFunctionalTest.php │ │ ├── DistinctTest.php │ │ ├── DropCollectionFunctionalTest.php │ │ ├── DropCollectionTest.php │ │ ├── DropDatabaseFunctionalTest.php │ │ ├── DropDatabaseTest.php │ │ ├── DropIndexesFunctionalTest.php │ │ ├── DropIndexesTest.php │ │ ├── EstimatedDocumentCountTest.php │ │ ├── ExplainFunctionalTest.php │ │ ├── ExplainTest.php │ │ ├── FindAndModifyFunctionalTest.php │ │ ├── FindAndModifyTest.php │ │ ├── FindFunctionalTest.php │ │ ├── FindOneAndDeleteTest.php │ │ ├── FindOneAndReplaceTest.php │ │ ├── FindOneAndUpdateTest.php │ │ ├── FindOneFunctionalTest.php │ │ ├── FindTest.php │ │ ├── FunctionalTestCase.php │ │ ├── InsertManyFunctionalTest.php │ │ ├── InsertManyTest.php │ │ ├── InsertOneFunctionalTest.php │ │ ├── InsertOneTest.php │ │ ├── ListCollectionsFunctionalTest.php │ │ ├── ListCollectionsTest.php │ │ ├── ListDatabasesFunctionalTest.php │ │ ├── ListDatabasesTest.php │ │ ├── ListIndexesFunctionalTest.php │ │ ├── ListIndexesTest.php │ │ ├── MapReduceFunctionalTest.php │ │ ├── MapReduceTest.php │ │ ├── ModifyCollectionFunctionalTest.php │ │ ├── ModifyCollectionTest.php │ │ ├── ReplaceOneTest.php │ │ ├── TestCase.php │ │ ├── UpdateFunctionalTest.php │ │ ├── UpdateManyTest.php │ │ ├── UpdateOneTest.php │ │ ├── UpdateTest.php │ │ ├── WatchFunctionalTest.php │ │ └── WatchTest.php │ │ ├── PedantryTest.php │ │ ├── SpecTests │ │ ├── ChangeStreamsSpecTest.php │ │ ├── ClientSideEncryptionSpecTest.php │ │ ├── CommandExpectations.php │ │ ├── CommandMonitoringSpecTest.php │ │ ├── Context.php │ │ ├── CrudSpecTest.php │ │ ├── DocumentsMatchConstraint.php │ │ ├── DocumentsMatchConstraintTest.php │ │ ├── ErrorExpectation.php │ │ ├── FunctionalTestCase.php │ │ ├── Operation.php │ │ ├── PrimaryStepDownSpecTest.php │ │ ├── ResultExpectation.php │ │ ├── RetryableReadsSpecTest.php │ │ ├── RetryableWritesSpecTest.php │ │ ├── TransactionsSpecTest.php │ │ ├── change-streams │ │ │ ├── README.rst │ │ │ ├── change-streams-errors.json │ │ │ ├── change-streams-errors.yml │ │ │ ├── change-streams.json │ │ │ └── change-streams.yml │ │ ├── client-side-encryption │ │ │ ├── corpus │ │ │ │ ├── corpus-encrypted.json │ │ │ │ ├── corpus-key-aws.json │ │ │ │ ├── corpus-key-local.json │ │ │ │ ├── corpus-schema.json │ │ │ │ └── corpus.json │ │ │ ├── external │ │ │ │ ├── external-key.json │ │ │ │ └── external-schema.json │ │ │ ├── limits │ │ │ │ ├── limits-doc.json │ │ │ │ ├── limits-key.json │ │ │ │ └── limits-schema.json │ │ │ └── tests │ │ │ │ ├── aggregate.json │ │ │ │ ├── badQueries.json │ │ │ │ ├── badSchema.json │ │ │ │ ├── basic.json │ │ │ │ ├── bulk.json │ │ │ │ ├── bypassAutoEncryption.json │ │ │ │ ├── bypassedCommand.json │ │ │ │ ├── count.json │ │ │ │ ├── countDocuments.json │ │ │ │ ├── delete.json │ │ │ │ ├── distinct.json │ │ │ │ ├── explain.json │ │ │ │ ├── find.json │ │ │ │ ├── findOneAndDelete.json │ │ │ │ ├── findOneAndReplace.json │ │ │ │ ├── findOneAndUpdate.json │ │ │ │ ├── getMore.json │ │ │ │ ├── insert.json │ │ │ │ ├── keyAltName.json │ │ │ │ ├── localKMS.json │ │ │ │ ├── localSchema.json │ │ │ │ ├── malformedCiphertext.json │ │ │ │ ├── maxWireVersion.json │ │ │ │ ├── missingKey.json │ │ │ │ ├── replaceOne.json │ │ │ │ ├── types.json │ │ │ │ ├── unsupportedCommand.json │ │ │ │ ├── updateMany.json │ │ │ │ └── updateOne.json │ │ ├── command-monitoring │ │ │ ├── bulkWrite.json │ │ │ ├── command.json │ │ │ ├── deleteMany.json │ │ │ ├── deleteOne.json │ │ │ ├── find.json │ │ │ ├── insertMany.json │ │ │ ├── insertOne.json │ │ │ ├── unacknowledgedBulkWrite.json │ │ │ ├── updateMany.json │ │ │ └── updateOne.json │ │ ├── crud │ │ │ ├── aggregate-merge.json │ │ │ ├── aggregate-out-readConcern.json │ │ │ ├── bulkWrite-arrayFilters.json │ │ │ ├── bulkWrite-update-hint.json │ │ │ ├── db-aggregate.json │ │ │ ├── find-allowdiskuse.json │ │ │ ├── replaceOne-hint.json │ │ │ ├── updateMany-hint.json │ │ │ ├── updateOne-hint.json │ │ │ └── updateWithPipelines.json │ │ ├── retryable-reads │ │ │ ├── aggregate-merge.json │ │ │ ├── aggregate-serverErrors.json │ │ │ ├── aggregate.json │ │ │ ├── changeStreams-client.watch-serverErrors.json │ │ │ ├── changeStreams-client.watch.json │ │ │ ├── changeStreams-db.coll.watch-serverErrors.json │ │ │ ├── changeStreams-db.coll.watch.json │ │ │ ├── changeStreams-db.watch-serverErrors.json │ │ │ ├── changeStreams-db.watch.json │ │ │ ├── count-serverErrors.json │ │ │ ├── count.json │ │ │ ├── countDocuments-serverErrors.json │ │ │ ├── countDocuments.json │ │ │ ├── distinct-serverErrors.json │ │ │ ├── distinct.json │ │ │ ├── estimatedDocumentCount-serverErrors.json │ │ │ ├── estimatedDocumentCount.json │ │ │ ├── find-serverErrors.json │ │ │ ├── find.json │ │ │ ├── findOne-serverErrors.json │ │ │ ├── findOne.json │ │ │ ├── gridfs-download-serverErrors.json │ │ │ ├── gridfs-download.json │ │ │ ├── gridfs-downloadByName-serverErrors.json │ │ │ ├── gridfs-downloadByName.json │ │ │ ├── listCollectionNames-serverErrors.json │ │ │ ├── listCollectionNames.json │ │ │ ├── listCollectionObjects-serverErrors.json │ │ │ ├── listCollectionObjects.json │ │ │ ├── listCollections-serverErrors.json │ │ │ ├── listCollections.json │ │ │ ├── listDatabaseNames-serverErrors.json │ │ │ ├── listDatabaseNames.json │ │ │ ├── listDatabaseObjects-serverErrors.json │ │ │ ├── listDatabaseObjects.json │ │ │ ├── listDatabases-serverErrors.json │ │ │ ├── listDatabases.json │ │ │ ├── listIndexNames-serverErrors.json │ │ │ ├── listIndexNames.json │ │ │ ├── listIndexes-serverErrors.json │ │ │ ├── listIndexes.json │ │ │ └── mapReduce.json │ │ ├── retryable-writes │ │ │ ├── bulkWrite-serverErrors.json │ │ │ ├── bulkWrite.json │ │ │ ├── deleteMany.json │ │ │ ├── deleteOne-serverErrors.json │ │ │ ├── deleteOne.json │ │ │ ├── findOneAndDelete-serverErrors.json │ │ │ ├── findOneAndDelete.json │ │ │ ├── findOneAndReplace-serverErrors.json │ │ │ ├── findOneAndReplace.json │ │ │ ├── findOneAndUpdate-serverErrors.json │ │ │ ├── findOneAndUpdate.json │ │ │ ├── insertMany-serverErrors.json │ │ │ ├── insertMany.json │ │ │ ├── insertOne-serverErrors.json │ │ │ ├── insertOne.json │ │ │ ├── replaceOne-serverErrors.json │ │ │ ├── replaceOne.json │ │ │ ├── updateMany.json │ │ │ ├── updateOne-serverErrors.json │ │ │ └── updateOne.json │ │ ├── transactions-convenient-api │ │ │ ├── callback-aborts.json │ │ │ ├── callback-commits.json │ │ │ ├── callback-retry.json │ │ │ ├── commit-retry.json │ │ │ ├── commit-transienttransactionerror-4.2.json │ │ │ ├── commit-transienttransactionerror.json │ │ │ ├── commit-writeconcernerror.json │ │ │ ├── commit.json │ │ │ └── transaction-options.json │ │ └── transactions │ │ │ ├── abort.json │ │ │ ├── bulk.json │ │ │ ├── causal-consistency.json │ │ │ ├── commit.json │ │ │ ├── count.json │ │ │ ├── delete.json │ │ │ ├── error-labels.json │ │ │ ├── errors-client.json │ │ │ ├── errors.json │ │ │ ├── findOneAndDelete.json │ │ │ ├── findOneAndReplace.json │ │ │ ├── findOneAndUpdate.json │ │ │ ├── insert.json │ │ │ ├── isolation.json │ │ │ ├── mongos-pin-auto.json │ │ │ ├── mongos-recovery-token.json │ │ │ ├── pin-mongos.json │ │ │ ├── read-concern.json │ │ │ ├── read-pref.json │ │ │ ├── reads.json │ │ │ ├── retryable-abort.json │ │ │ ├── retryable-commit.json │ │ │ ├── retryable-writes.json │ │ │ ├── run-command.json │ │ │ ├── transaction-options.json │ │ │ ├── update.json │ │ │ └── write-concern.json │ │ ├── TestCase.php │ │ └── bootstrap.php ├── 5.4 │ ├── 1-test.go │ ├── 2-find_one.go │ ├── 3-find.go │ ├── 4-find-sorted-limited.go │ ├── README.md │ ├── go.mod │ └── go.sum ├── 5.5 │ ├── README.md │ ├── example.py │ └── images │ │ ├── apple-pie.jpg │ │ ├── colorado-springs-christmas.jpg │ │ ├── colorado-springs-soccer.jpg │ │ ├── dc.jpg │ │ ├── empañadas.jpg │ │ ├── pike-place.jpg │ │ └── pikes-peak.jpg ├── 6.1 │ ├── ASSESSMENT.md │ ├── README.md │ ├── mongod.conf │ └── sample.conf ├── 6.2 │ ├── ASSESSMENT.md │ └── README.md ├── 6.3 │ ├── ASSESSMENT.md │ └── README.md ├── 6.4 │ ├── ASSESSMENT.md │ ├── README.md │ └── createUser.json ├── 6.5 │ ├── ASSESSMENT.md │ └── README.md └── 7.1 │ └── README.md └── mongod.conf /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Codeowners for these exercise files: 2 | # * (asterisk) deotes "all files and folders" 3 | # Example: * @producer @instructor 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | ## Issue Overview 9 | 10 | 11 | ## Describe your environment 12 | 13 | 14 | ## Steps to Reproduce 15 | 16 | 1. 17 | 2. 18 | 3. 19 | 4. 20 | 21 | ## Expected Behavior 22 | 23 | 24 | ## Current Behavior 25 | 26 | 27 | ## Possible Solution 28 | 29 | 30 | ## Screenshots / Video 31 | 32 | 33 | ## Related Issues 34 | 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .tmp 4 | npm-debug.log 5 | bin 6 | _data 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | Contribution Agreement 3 | ====================== 4 | 5 | This repository does not accept pull requests (PRs). All pull requests will be closed. 6 | 7 | However, if any contributions (through pull requests, issues, feedback or otherwise) are provided, as a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code (or otherwise providing feedback), you (and, if applicable, your employer) are licensing the submitted code (and/or feedback) to LinkedIn and the open source community subject to the BSD 2-Clause license. 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2022 LinkedIn Corporation 2 | All Rights Reserved. 3 | 4 | Licensed under the LinkedIn Learning Exercise File License (the "License"). 5 | See LICENSE in the project root for license information. 6 | 7 | Please note, this project may automatically load third party code from external 8 | repositories (for example, NPM modules, Composer packages, or other dependencies). 9 | If so, such third party code may be subject to other license terms than as set 10 | forth above. In addition, such third party code may also depend on and load 11 | multiple tiers of dependencies. Please review the applicable licenses of the 12 | additional dependencies. 13 | -------------------------------------------------------------------------------- /collections/README.md: -------------------------------------------------------------------------------- 1 | # Course Collections 2 | 3 | These files are meant to be used with the `mongoimport` tool, to import the files use the tool as follows: 4 | 5 | `mongoimport --db=cooker --jsonArray recipes.json` 6 | 7 | _Using MongoDb 4.4+? Make sure you download the MongoDB Database Tools. See [note](../#download-mongodb-database-tools-if-using-44) in README about `mongoimport`._ -------------------------------------------------------------------------------- /collections/users.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "_id": { 3 | "$oid": "5ebc44f23a289bc862491d92" 4 | }, 5 | "user_id": 2, 6 | "firstName": "Grace", 7 | "lastname": "Hopper", 8 | "title": "Rear Admiral", 9 | "email": "grace@navy.mil", 10 | "password": "C8w4&CWC^egwecwoWei79chwf" 11 | }, 12 | { 13 | "_id": { 14 | "$oid": "5ee695203260aab97ea0d58c" 15 | }, 16 | "user_id": 1, 17 | "firstName": "Caderyn", 18 | "lastName": "Jenkins", 19 | "email": "none@example.com", 20 | "password": "ZHN5t6RPW8krrkm72ir7NeMYF37G6Rle" 21 | }] 22 | 23 | -------------------------------------------------------------------------------- /lessons/1.2/README.md: -------------------------------------------------------------------------------- 1 | #MongoDB vs Relational Databases 2 | 3 | There are some key differences between a traditional "relational" database like SQL and MongoDB's "NoSQL" type. In this video we'll give high level but explicite overview of the differences. 4 | -------------------------------------------------------------------------------- /lessons/1.3/README.md: -------------------------------------------------------------------------------- 1 | # Install MongoDB on MacOS and import data 2 | 3 | In this video, we will learn how to set up a basic MongoDB server on MacOS. 4 | 5 | - [Installl MongoDB on MacOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/) 6 | -------------------------------------------------------------------------------- /lessons/1.4/README.md: -------------------------------------------------------------------------------- 1 | # Install MongoDB on Windows and import data 2 | 3 | In this video, we will learn how to set up a basic MongoDB server on the Windows OS. 4 | 5 | - [Install MongoDB on Windows](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/) 6 | - [mongod](https://docs.mongodb.com/manual/reference/program/mongod/index.html) 7 | -------------------------------------------------------------------------------- /lessons/1.6/README.md: -------------------------------------------------------------------------------- 1 | # Using the MongoDB Database Tools 2 | 3 | The MongoDB Database Tools is a set of command line programs you can use to interact and work with MongoDB. In this lesson we'll review installing the tools, what each one does and how to use a couple we use within the course. 4 | 5 | Make sure you install `mongoimport` as well as `mongofiles` you will need them in this course! 6 | 7 | - [MongoDB Database Tools](https://docs.mongodb.com/database-tools/) 8 | - [Download](https://www.mongodb.com/try/download/database-tools) -------------------------------------------------------------------------------- /lessons/1.7/README.md: -------------------------------------------------------------------------------- 1 | #Importing Example Data 2 | 3 | 4 | - [`mongoimport` docs](https://docs.mongodb.com/database-tools/mongoimport/) 5 | - [MongoDB Compass GUI](https://www.mongodb.com/try/download/compass) 6 | - [MongoDB Compass docs](https://docs.mongodb.com/compass/master/) -------------------------------------------------------------------------------- /lessons/2.1/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### In MongoDB Documents are: 4 | 5 | a) Fields of strings, srrays and objects stored in Text 6 | b) Fields and values stored in JSON 7 | c) Fields with columns containing strings, numbers and booleans 8 | d) Field value pairs stored in BSON 9 | 10 | **Answer D** 11 | -------------------------------------------------------------------------------- /lessons/2.1/README.md: -------------------------------------------------------------------------------- 1 | # Create a Document 2 | 3 | MongoDB stores data in Documents, which differs from how relational databases work. Learn how to create a number of basic Documents in MongoDB that will store information about recipes. 4 | 5 | ## Links 6 | 7 | - [Documents](https://docs.mongodb.com/manual/core/document/) 8 | - [MongoDB Shell](https://docs.mongodb.com/manual/mongo/) 9 | - [BSON Types](https://docs.mongodb.com/manual/reference/bson-types/) 10 | - [db.collection.insertOne()](https://docs.mongodb.com/manual/reference/method/db.collection.insertOne/) 11 | - [MongoDB Shell Cursor Methods](https://docs.mongodb.com/manual/reference/method/db.collection.find/index.html#available-mongo-shell-cursor-methods) 12 | 13 | **recipe.json** 14 | 15 | ``` 16 | { 17 | "title": "Chicken Tacos", 18 | "description": "Classic Mexican tacos", 19 | "cook_time": 20 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /lessons/2.1/recipe.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Chicken Tacos", 3 | "description": "Classic Mexican tacos", 4 | "cook_time": 20 5 | } 6 | -------------------------------------------------------------------------------- /lessons/2.2/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### To find a Document with the title Apple Pie and return only the title: 4 | 5 | a) `db.recipes.find({"title": "Apple Pie"}, {"title": 1})` 6 | b) `db.recipes.find({"title": 1}, {"title": "Apple Pie"})` 7 | c) `db.recipes.find({"title": "Apple Pie"}, "title": 1)` 8 | d) `db.recipes.find({"title": "Apple Pie", "title": 1})` 9 | 10 | **Answer A** 11 | -------------------------------------------------------------------------------- /lessons/2.2/README.md: -------------------------------------------------------------------------------- 1 | # Using .find() to query Documents 2 | 3 | The `find()` command is one of the most basic MongoDB commands and acts much like a SELECT statement in SQL. Learn how to use `find()` to query our recipe Documents and find specific recipes. 4 | 5 | ## Links 6 | 7 | - [Query Documents](https://docs.mongodb.com/manual/tutorial/query-documents/) 8 | - [db.collection.find()](https://docs.mongodb.com/manual/reference/method/db.collection.find/) 9 | -------------------------------------------------------------------------------- /lessons/2.3/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### In a Document you can store: 4 | 5 | a) Just Strings and Numbers 6 | b) Strings, Arrays, Objects, Documents, Numbers, Booleans, Etc. 7 | c) Either Strings, Numbers or Booleans 8 | d) Multiple different kinds of Strings 9 | 10 | **Answer B** 11 | -------------------------------------------------------------------------------- /lessons/2.3/README.md: -------------------------------------------------------------------------------- 1 | # What can we store in a Document? 2 | 3 | MongoDB Documents can store a wide variety of data in a number of different formats, which often makes development easier. In this lesson, we will learn more about Documents—what they are and what they can store such as simple data types and arrays, which can house "tags" of meta data for recipes. 4 | 5 | ## Links 6 | 7 | - [Data Modeling](https://docs.mongodb.com/manual/core/data-modeling-introduction/) 8 | - [Documents](https://docs.mongodb.com/manual/core/document/) 9 | 10 | **directions.json** 11 | 12 | ``` 13 | { 14 | "title": "Apple Pie", 15 | "directions": [ 16 | "Roll the pie crust", 17 | "Make the filling", 18 | "Bake" 19 | ] 20 | } 21 | ``` 22 | 23 | **ingredients.json** 24 | 25 | ``` 26 | { 27 | "title": "Apple Pie", 28 | "directions": [ 29 | "Roll the pie crust", 30 | "Make the filling", 31 | "Bake" 32 | ], 33 | "ingredients": [ 34 | { 35 | "amount": { 36 | "quantity": 2, 37 | "unit": null 38 | }, 39 | "name": "pie crusts" 40 | }, { 41 | "amount": { 42 | "quantity": 1, 43 | "unit": "tbsp" 44 | }, 45 | "name": "cinnamon" 46 | } 47 | ] 48 | } 49 | ``` 50 | -------------------------------------------------------------------------------- /lessons/2.3/directions.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Apple Pie", 3 | "directions": [ 4 | "Roll the pie crust", 5 | "Make the filling", 6 | "Bake" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /lessons/2.3/ingredients.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Apple Pie", 3 | "directions": [ 4 | "Roll the pie crust", 5 | "Make the filling", 6 | "Bake" 7 | ], 8 | "ingredients": [ 9 | { 10 | "amount": { 11 | "quantity": 2, 12 | "unit": null 13 | }, 14 | "name": "pie crusts" 15 | }, { 16 | "amount": { 17 | "quantity": 1, 18 | "unit": "tbsp" 19 | }, 20 | "name": "cinnamon" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /lessons/2.4/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### Collections are created: 4 | 5 | a) With the create() collection command 6 | b) Automatically when data is inserted 7 | c) MongoDB will prompt you when you try to insert 8 | d) When the database is created 9 | 10 | **Answer B** 11 | -------------------------------------------------------------------------------- /lessons/2.4/README.md: -------------------------------------------------------------------------------- 1 | # Collections 2 | 3 | Collections in MongoDB are an ideal way to group similar Document types. In this lesson, you will learn how and when you should use Collections. 4 | 5 | - [Databases and Collections](https://docs.mongodb.com/manual/core/databases-and-collections/index.html) 6 | - [Capped Collections](https://docs.mongodb.com/manual/core/capped-collections/index.html) 7 | - [Collection Info](https://docs.mongodb.com/manual/reference/method/db.getCollectionInfos/index.html) 8 | - [db.collection.insertOne()](https://docs.mongodb.com/manual/reference/method/db.collection.insertOne/) 9 | -------------------------------------------------------------------------------- /lessons/3.1/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### To sort by title in descending order you would use ... 4 | 5 | a) `db.collection.find({}).sort({"title" : 1})` 6 | b) `db.collection.find({"title" : -1}).sort()` 7 | c) `db.collection.find({}).sort({"title" : -1})` 8 | d) `db.collection.find({}, {"title": -1})` 9 | 10 | **Answer B** 11 | -------------------------------------------------------------------------------- /lessons/3.1/README.md: -------------------------------------------------------------------------------- 1 | # Sort, limit, and skip 2 | 3 | With any database sorting and limiting, your results are key to performance and user experience. Using our collection of recipes, we'll learn how to sort and limit our results based on typical application needs. 4 | 5 | - [limit()](https://docs.mongodb.com/manual/reference/method/cursor.limit/index.html) 6 | - [sort()](https://docs.mongodb.com/manual/reference/method/cursor.sort/index.html) 7 | - [skip()](https://docs.mongodb.com/manual/reference/method/cursor.skip/index.html) 8 | - [find()](https://docs.mongodb.com/manual/reference/command/find/index.html) 9 | -------------------------------------------------------------------------------- /lessons/3.2/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### To find a recipe containing an ingredient "tofu" you would use: 4 | 5 | a) `db.collection.find({ "ingredients["name"]" : "tofu" })` 6 | b) `db.collection.find({ "ingredients" : { "name" : "tofu" } })` 7 | c) `db.collection.find({ "ingredients{"name"} : "tofu" })` 8 | d) `db.collection.find({ "ingredients.name" : "tofu" })` 9 | 10 | **Answer D** 11 | -------------------------------------------------------------------------------- /lessons/3.2/README.md: -------------------------------------------------------------------------------- 1 | # Working with operators and arrays 2 | 3 | MongoDB has a number of operators that can be used both on fields and arrays in queries to conditionally filter results to perform aggregation. Learn how to use operators to filter our recipe Documents. 4 | 5 | - [Query and Projection Operators](https://docs.mongodb.com/manual/reference/operator/query/) 6 | - [Comparison Query Operators](https://docs.mongodb.com/manual/reference/operator/query-comparison/) 7 | -------------------------------------------------------------------------------- /lessons/3.3/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### To update a field's value you would use the following operator: 4 | 5 | a) `$set` 6 | b) `$update` 7 | c) `$value` 8 | d) `$unset` 9 | 10 | **Answer A** 11 | -------------------------------------------------------------------------------- /lessons/3.3/README.md: -------------------------------------------------------------------------------- 1 | # Updating Documents 2 | 3 | Learn how to update and delete Documents. In this lesson, we will update our recipes to create better titles, add new metadata tags, and delete recipes. 4 | 5 | [Field Update Operators](https://docs.mongodb.com/manual/reference/operator/update-field/) 6 | 7 | [\$set](https://docs.mongodb.com/manual/reference/operator/update/set/) 8 | [\$unset](https://docs.mongodb.com/manual/reference/operator/update/unset/) 9 | [\$inc](https://docs.mongodb.com/manual/reference/operator/update/inc/) 10 | -------------------------------------------------------------------------------- /lessons/3.4/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### To add a new item to a field that is an array you would use the follow operator: 4 | 5 | a) `$pull` 6 | b) `$add` 7 | c) `$set` 8 | d) `$push` 9 | 10 | **Answer D** 11 | -------------------------------------------------------------------------------- /lessons/3.4/README.md: -------------------------------------------------------------------------------- 1 | # Updating Arrays 2 | 3 | Learn how to update and delete Documents. In this lesson, we will update our recipes to create better titles, add new metadata tags, and delete recipes. 4 | 5 | - [Array Update Operators](https://docs.mongodb.com/manual/reference/operator/update-array/) 6 | - [\$push](https://docs.mongodb.com/manual/reference/operator/update/push/) 7 | - [\$pull](https://docs.mongodb.com/manual/reference/operator/update/pull/) 8 | -------------------------------------------------------------------------------- /lessons/3.5/README.md: -------------------------------------------------------------------------------- 1 | # Deleting Documents 2 | 3 | Learn how to update and delete Documents. In this lesson, we will update our recipes to create better titles, add new metadata tags, and delete recipes. 4 | 5 | - [Delete Documents](https://docs.mongodb.com/manual/tutorial/remove-documents/index.html) 6 | - [db.collection.deleteOne](https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne/) 7 | -------------------------------------------------------------------------------- /lessons/3.6/README.md: -------------------------------------------------------------------------------- 1 | # Challenge: Write a query 2 | 3 | - [Query and Projection Operators](https://docs.mongodb.com/manual/reference/operator/query/) 4 | - [Comparison Query Operators](https://docs.mongodb.com/manual/reference/operator/query-comparison/) 5 | - [Array Query Operators](https://docs.mongodb.com/manual/reference/operator/query-array/) 6 | -------------------------------------------------------------------------------- /lessons/3.7/README.md: -------------------------------------------------------------------------------- 1 | # Solution: How to write a query 2 | 3 | Query 1 4 | 5 | `db.recipes.find({}, {"title": 1}).sort({"rating_avg": -1}).limit(4);` 6 | 7 | Query 2 8 | 9 | `db.recipes.find({"tags" : "mexican"}, {"title": 1}).sort({"rating_avg": -1}).limit(4);` 10 | 11 | Query 3 12 | 13 | `db.recipes.find({"likes": { $all : [1] }}, {"title" : 1}).sort({"title": 1});` 14 | -------------------------------------------------------------------------------- /lessons/3.8/README.md: -------------------------------------------------------------------------------- 1 | #The new MongoDB Shell "mongosh" versus the Legacy Shell "mongo" 2 | 3 | In MongoDB 5.0 a new mongo shell was introduced that enhances the command line experience. In this course we'll use the legacy shell, but in this video we'll review the new shell and highlight some differences. 4 | 5 | - [MongoDB Shell `mongosh` Docs](https://docs.mongodb.com/mongodb-shell/) 6 | - [Download MongoDB Shell](https://www.mongodb.com/try/download/shell) -------------------------------------------------------------------------------- /lessons/4.1/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### Data that is accessed together should be ...: 4 | 5 | a) Stored together 6 | b) Updated together 7 | c) Kept apart and organzied 8 | d) Backed up together 9 | 10 | **Answer A** 11 | -------------------------------------------------------------------------------- /lessons/4.1/README.md: -------------------------------------------------------------------------------- 1 | # How we need to think differently ... 2 | 3 | MongoDB Document model is inherently different than relational databases and as such we need to think differently about how we store data and when (and when not) to use MongoDB. Learn how about how MongoDB handles common database concepts like normalization and schemas, and how MongoDB's data modal forces us to think differently about them. 4 | 5 | - [Data Modeling Introduction](https://docs.mongodb.com/manual/core/data-modeling-introduction/) 6 | - [Data Model Design](https://docs.mongodb.com/manual/core/data-model-design/) 7 | - [Model One-to-One Relationships with Embedded Documents](https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-one-relationships-between-documents/) 8 | - [Model One-to-Many Relationships with Embedded Documents](https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-many-relationships-between-documents/) 9 | - [Model One-to-Many Relationships with Document References](https://docs.mongodb.com/manual/tutorial/model-referenced-one-to-many-relationships-between-documents/) 10 | -------------------------------------------------------------------------------- /lessons/4.2/ASSESSMENT.md: -------------------------------------------------------------------------------- 1 | ## Assessment 2 | 3 | #### A default index is created on the field: 4 | 5 | a) The first field with a number 6 | b) `_id` 7 | c) The first field 8 | d) There is no default index 9 | 10 | **Answer B** 11 | -------------------------------------------------------------------------------- /lessons/4.2/README.md: -------------------------------------------------------------------------------- 1 | # Basic indexes 2 | 3 | Properly indexing data is important for database performance. Learn how to create basic indexes in MongoDB and how this is both similar and dissimilar from relational database systems. 4 | 5 | - [Indexes](https://docs.mongodb.com/manual/indexes/index.html) 6 | - [Compound Indexes](https://docs.mongodb.com/manual/core/index-compound/) 7 | - [Unique Indexes](https://docs.mongodb.com/manual/core/index-unique/index.html) 8 | - [db.collection.explain()](https://docs.mongodb.com/manual/reference/method/db.collection.explain/index.html) 9 | - [db.collection.stats()](https://docs.mongodb.com/manual/reference/method/db.collection.stats/index.html) 10 | -------------------------------------------------------------------------------- /lessons/4.3/README.md: -------------------------------------------------------------------------------- 1 | # Using different collection types 2 | 3 | Storing different types of data may require using special types of collections. In this video we'll discuss two options Capped Collections and Time Series Collections (which is new in MongoDB 5.0). 4 | 5 | - [Capped Collections](https://docs.mongodb.com/manual/core/capped-collections/) 6 | - [Time Series Collections](https://docs.mongodb.com/manual/core/timeseries-collections/) -------------------------------------------------------------------------------- /lessons/4.4/ADDRESSES.csv: -------------------------------------------------------------------------------- 1 | user_id,street_name,city,state,zip 2 | 1,"123 Mushroom Ln,"Gondor","MS","12345" 3 | 2,"522 Oaks Oak Rd","Colorado Springs","CO","80000" 4 | 3,"82 73rd St","Seattle","WA","98000" -------------------------------------------------------------------------------- /lessons/4.4/BACKERS.csv: -------------------------------------------------------------------------------- 1 | user_id,first_name,last_name,email,backing_level 2 | 1,"Yoshi","McDonish","yoshi@zxy.com",2 3 | 2,"Caderyn","Jenkins","cade@zyx.com",1 4 | 3,"Evan","Thomas","evan@zyz.com",3 -------------------------------------------------------------------------------- /lessons/4.4/README.md: -------------------------------------------------------------------------------- 1 | # Challenge: Avoiding joins 2 | 3 | One of the more common concepts in relational databases is a JOIN, that is joining two separate pieces of data into one result. In this challenge, you will be asked to model your Documents in such a way as to make joins unnecessary. 4 | -------------------------------------------------------------------------------- /lessons/4.4/REWARDS.csv: -------------------------------------------------------------------------------- 1 | user_id,item_name 2 | 1,"book" 3 | 1,"beach towel" 4 | 2,"book" 5 | 3,"beach towel" 6 | 3,"golden mushroom" -------------------------------------------------------------------------------- /lessons/4.5/solution.json: -------------------------------------------------------------------------------- 1 | { 2 | "user_id": 1, 3 | "first_name": "Yoshi", 4 | "last_name": "McDonish", 5 | "email": "yoshi@zxy.com", 6 | "backing_level": 2, 7 | "shiping_address": { 8 | "street_name": "123 Mushroom Ln", 9 | "city": "Gondor", 10 | "state": "MS", 11 | "zip": "12345" 12 | }, 13 | "rewards": [ 14 | "book", 15 | "beach towel" 16 | ] 17 | } -------------------------------------------------------------------------------- /lessons/5.1/1-test.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | import pymongo 4 | 5 | print("Setting up mongo client") 6 | 7 | client = pymongo.MongoClient("localhost", 27017) 8 | 9 | print("Connecting to database ...") 10 | 11 | # set our database to "cooker" 12 | db = client.cooker 13 | 14 | database_name = db.name 15 | 16 | print("Connected Successfully!") 17 | 18 | # output DB name 19 | print("The database name is: {}".format(database_name)) 20 | 21 | -------------------------------------------------------------------------------- /lessons/5.1/2-find_one.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | import pymongo 4 | import pprint 5 | 6 | client = pymongo.MongoClient("localhost", 27017) 7 | 8 | # set our database to "cooker" 9 | db = client.cooker 10 | 11 | recipe = db.recipes.find_one() 12 | 13 | pp = pprint.PrettyPrinter(compact=True) 14 | 15 | pp.pprint(recipe) 16 | -------------------------------------------------------------------------------- /lessons/5.1/3-find.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | import pymongo 4 | 5 | client = pymongo.MongoClient("localhost", 27017) 6 | 7 | # set our database to "cooker" 8 | db = client.cooker 9 | 10 | for item in db.recipes.find(): 11 | print(item["title"]) 12 | -------------------------------------------------------------------------------- /lessons/5.1/4-find-sorted-limited.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | import pymongo 4 | 5 | client = pymongo.MongoClient("localhost", 27017) 6 | 7 | # set our database to "cooker" 8 | db = client.cooker 9 | 10 | for item in db.recipes.find().sort("title", pymongo.ASCENDING).limit(3): 11 | print(item["title"]) 12 | -------------------------------------------------------------------------------- /lessons/5.1/5-recipe-search.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | import pymongo 4 | import os 5 | 6 | client = pymongo.MongoClient("localhost", 27017) 7 | 8 | # set our database to "cooker" 9 | db = client.cooker 10 | 11 | print("What would you like to cook?:") 12 | search = input() 13 | 14 | os.system('clear') 15 | 16 | print("-------------------------------") 17 | print("Searching for ... \"{}\"".format(search)) 18 | print("-------------------------------") 19 | print("") 20 | print("We found the following recipes:\n") 21 | 22 | # using a case insensitive "i" $regex search, but most normal find queries will also work. 23 | query = { 24 | "title": { 25 | "$regex": search, 26 | "$options": "i" 27 | } 28 | } 29 | 30 | for item in db.recipes.find(query): 31 | 32 | # combine prep and cook times 33 | total_time = item["prep_time"]+item["cook_time"] 34 | 35 | output = "[{}]\n".format(item["title"]) 36 | output += "DESCRIPTION: {}\n".format(item["desc"]) 37 | output += "This recipe will take about {} minutes and be ".format(total_time) 38 | output += "~{} calories per serving\n".format(item["calories_per_serving"]) 39 | 40 | print(output) 41 | -------------------------------------------------------------------------------- /lessons/5.1/README.md: -------------------------------------------------------------------------------- 1 | # Python 2 | 3 | Using PyMongo, you will learn to create a basic Python application to display information from recipe Documents in MongoDB. 4 | 5 | - [Install pymongo](https://pypi.org/project/pymongo/) 6 | - [Docs](https://pymongo.readthedocs.io/en/stable/) 7 | - [Driver](https://docs.mongodb.com/drivers/python/) 8 | -------------------------------------------------------------------------------- /lessons/5.2/1-test.js: -------------------------------------------------------------------------------- 1 | const MongoClient = require('mongodb').MongoClient; 2 | const assert = require('assert'); 3 | 4 | const uri = 'mongodb://localhost:27017'; 5 | const db = 'cooker'; 6 | 7 | console.log("Setting up mongo client"); 8 | 9 | const client = new MongoClient(uri, { useUnifiedTopology: true}); 10 | 11 | console.log("Connecting to database ...") 12 | 13 | client.connect(function(err) { 14 | assert.equal(null, err); 15 | 16 | console.log("Connected Successfully!"); 17 | 18 | const database = client.db(db); 19 | 20 | console.log("The database name is: " + database.databaseName); 21 | 22 | client.close(); 23 | }); 24 | -------------------------------------------------------------------------------- /lessons/5.2/2-find_one.js: -------------------------------------------------------------------------------- 1 | const MongoClient = require('mongodb').MongoClient; 2 | 3 | const uri = 'mongodb://localhost:27017'; 4 | const db = 'cooker'; 5 | 6 | (async function() { 7 | const client = new MongoClient(uri, { useUnifiedTopology: true}); 8 | 9 | try { 10 | await client.connect(); 11 | 12 | const database = client.db(db); 13 | 14 | const collection = database.collection('recipes'); 15 | 16 | const recipe = await collection.findOne(); 17 | 18 | console.log(recipe); 19 | 20 | } catch (err) { 21 | console.log(err.stack); 22 | } 23 | 24 | await client.close(); 25 | })(); 26 | -------------------------------------------------------------------------------- /lessons/5.2/3-find.js: -------------------------------------------------------------------------------- 1 | const MongoClient = require('mongodb').MongoClient; 2 | 3 | const uri = 'mongodb://localhost:27017'; 4 | const db = 'cooker'; 5 | 6 | (async function() { 7 | const client = new MongoClient(uri, { useUnifiedTopology: true}); 8 | 9 | try { 10 | await client.connect(); 11 | 12 | const database = client.db(db); 13 | 14 | const collection = database.collection('recipes'); 15 | 16 | const recipes = collection.find(); 17 | 18 | // iterate over the cursor 19 | while(await recipes.hasNext()) { 20 | const recipe = await recipes.next(); 21 | console.dir(recipe.title); 22 | } 23 | 24 | } catch (err) { 25 | console.log(err.stack); 26 | } 27 | 28 | await client.close(); 29 | })(); 30 | -------------------------------------------------------------------------------- /lessons/5.2/4-find-sorted-limted.js: -------------------------------------------------------------------------------- 1 | const MongoClient = require('mongodb').MongoClient; 2 | 3 | const uri = 'mongodb://localhost:27017'; 4 | const db = 'cooker'; 5 | 6 | (async function() { 7 | const client = new MongoClient(uri, { useUnifiedTopology: true}); 8 | 9 | try { 10 | await client.connect(); 11 | 12 | const database = client.db(db); 13 | 14 | const collection = database.collection('recipes'); 15 | 16 | const recipes = collection.find().sort(['title', 1]).limit(3); 17 | 18 | // iterate over the cursor 19 | while(await recipes.hasNext()) { 20 | const recipe = await recipes.next(); 21 | console.dir(recipe.title); 22 | } 23 | 24 | } catch (err) { 25 | console.log(err.stack); 26 | } 27 | 28 | await client.close(); 29 | })(); 30 | -------------------------------------------------------------------------------- /lessons/5.2/README.md: -------------------------------------------------------------------------------- 1 | # Node.js 2 | 3 | Using Node.js MongoDB driver, you will learn to create a basic Node.js application to display information from recipe Documents in MongoDB. 4 | 5 | - [MongoDB Node Driver](https://docs.mongodb.com/drivers/node/) 6 | - [Quick Start](https://docs.mongodb.com/drivers/node/current/quick-start/) 7 | - [Usage Examples](https://docs.mongodb.com/drivers/node/current/usage-examples/) 8 | - [API Documentation](http://mongodb.github.io/node-mongodb-native/3.6/api/) 9 | -------------------------------------------------------------------------------- /lessons/5.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "5.2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "1-test.js", 6 | "dependencies": { 7 | "core-util-is": "^1.0.2", 8 | "mongodb": "^3.5.9" 9 | }, 10 | "devDependencies": {}, 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "author": "", 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /lessons/5.3/1-test.php: -------------------------------------------------------------------------------- 1 | "; 7 | echo "Setting up mongo client\n"; 8 | 9 | $client = new MongoDB\Client( 10 | 'mongodb://localhost:27017/cooker' 11 | ); 12 | 13 | echo "Connecting to database ...\n"; 14 | 15 | $db = $client->cooker; 16 | 17 | echo "Connected Successfully!\n"; 18 | 19 | $database_name = $db->getDatabaseName(); 20 | 21 | echo "The database name is: {$database_name}\n"; 22 | 23 | echo ""; 24 | 25 | require 'inc/footer.php'; -------------------------------------------------------------------------------- /lessons/5.3/2-find_one.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | $client = new MongoDB\Client( 9 | 'mongodb://localhost:27017/cooker' 10 | ); 11 | 12 | $collection = $client->cooker->recipes; 13 | 14 | $recipe = $collection->findOne(); 15 | 16 | echo json_encode($recipe, JSON_PRETTY_PRINT); 17 | 18 | echo ""; 19 | 20 | require 'inc/footer.php'; -------------------------------------------------------------------------------- /lessons/5.3/3-find.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | $client = new MongoDB\Client( 9 | 'mongodb://localhost:27017/cooker' 10 | ); 11 | 12 | $collection = $client->cooker->recipes; 13 | 14 | $recipes = $collection->find(); 15 | 16 | foreach ($recipes as $recipe) { 17 | echo $recipe['title'] . "\n"; 18 | } 19 | 20 | echo ""; 21 | 22 | require 'inc/footer.php'; -------------------------------------------------------------------------------- /lessons/5.3/4-find-sorted-limited.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | $client = new MongoDB\Client( 9 | 'mongodb://localhost:27017/cooker' 10 | ); 11 | 12 | $collection = $client->cooker->recipes; 13 | 14 | $options = []; 15 | $options['sort'] = ['title' => 1]; 16 | $options['limit'] = 3; 17 | 18 | $recipes = $collection->find([], $options); 19 | 20 | foreach ($recipes as $recipe) { 21 | echo $recipe['title'] . "\n"; 22 | } 23 | 24 | echo ""; 25 | 26 | require 'inc/footer.php'; -------------------------------------------------------------------------------- /lessons/5.3/README.md: -------------------------------------------------------------------------------- 1 | # PHP 2 | 3 | Using the PHP MongoDB extension, you will learn to create a basic PHP application to display information from recipe Documents in MongoDB. 4 | 5 | - [PHP driver](https://docs.mongodb.com/drivers/php) 6 | - [Driver Docs](https://www.php.net/mongodb) 7 | -------------------------------------------------------------------------------- /lessons/5.3/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "mongodb/mongodb": "^1.6", 4 | "ext-json": "*" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /lessons/5.3/inc/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lessons/5.3/inc/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MongoDB PHP Examples 7 | 8 | 9 | 10 |
11 |
12 |

13 | Learning MongoDB: PHP Examples 14 |

15 | 1-test.php 16 | 2-find_one.php 17 | 3-find.php 18 | 4-find-sorted-limited.php 19 | 5-recipe-search.php 20 |
21 | 22 |
-------------------------------------------------------------------------------- /lessons/5.3/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MongoDB PHP Examples 7 | 8 | 9 | 10 |
11 |
12 |

13 | PHP Examples 14 |

15 | 1-test.php 16 | 2-find_one.php 17 | 3-find.php 18 | 4-find-sorted-limited.php 19 | 5-recipe-search.php 20 |
21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /lessons/5.3/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/autoload.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/mongodb/mongodb/src/functions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/mongodb/mongodb/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php', 11 | ); 12 | 13 | public static $prefixLengthsPsr4 = array ( 14 | 'M' => 15 | array ( 16 | 'MongoDB\\' => 8, 17 | ), 18 | ); 19 | 20 | public static $prefixDirsPsr4 = array ( 21 | 'MongoDB\\' => 22 | array ( 23 | 0 => __DIR__ . '/..' . '/mongodb/mongodb/src', 24 | ), 25 | ); 26 | 27 | public static function getInitializer(ClassLoader $loader) 28 | { 29 | return \Closure::bind(function () use ($loader) { 30 | $loader->prefixLengthsPsr4 = ComposerStaticInitb9095547253f49d6667689f305500da0::$prefixLengthsPsr4; 31 | $loader->prefixDirsPsr4 = ComposerStaticInitb9095547253f49d6667689f305500da0::$prefixDirsPsr4; 32 | 33 | }, null, ClassLoader::class); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/.gitignore: -------------------------------------------------------------------------------- 1 | # Composer 2 | composer.phar 3 | composer.lock 4 | vendor/ 5 | 6 | # PHPUnit 7 | phpunit.phar 8 | phpunit.xml 9 | .phpunit.result.cache 10 | 11 | # phpcs 12 | .phpcs-cache 13 | phpcs.xml 14 | 15 | mongocryptd.pid 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/.phpcs/autoload.php: -------------------------------------------------------------------------------- 1 | /dev/null 2>&1; \ 7 | if test $$? -eq 0; then \ 8 | composer $(COMPOSER_ARGS); \ 9 | elif test -r composer.phar; then \ 10 | php composer.phar $(COMPOSER_ARGS); \ 11 | else \ 12 | echo >&2 "Cannot find composer; aborting."; \ 13 | false; \ 14 | fi 15 | 16 | test: composer 17 | vendor/bin/phpunit 18 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongodb/mongodb", 3 | "description": "MongoDB driver library", 4 | "keywords": ["database", "driver", "mongodb", "persistence"], 5 | "homepage": "https://jira.mongodb.org/browse/PHPLIB", 6 | "license": "Apache-2.0", 7 | "authors": [ 8 | { "name": "Andreas Braun", "email": "andreas.braun@mongodb.com" }, 9 | { "name": "Jeremy Mikola", "email": "jmikola@gmail.com" }, 10 | { "name": "Katherine Walker", "email": "katherine.walker@mongodb.com" } 11 | ], 12 | "require": { 13 | "php": "^5.6 || ^7.0", 14 | "ext-hash": "*", 15 | "ext-json": "*", 16 | "ext-mongodb": "^1.7" 17 | }, 18 | "require-dev": { 19 | "phpunit/phpunit": "^5.7.27 || ^6.4 || ^8.3", 20 | "sebastian/comparator": "^1.0 || ^2.0 || ^3.0", 21 | "squizlabs/php_codesniffer": "^3.4", 22 | "symfony/phpunit-bridge": "^4.4@dev" 23 | }, 24 | "autoload": { 25 | "psr-4": { "MongoDB\\": "src/" }, 26 | "files": [ "src/functions.php" ] 27 | }, 28 | "autoload-dev": { 29 | "psr-4": { "MongoDB\\Tests\\": "tests/" } 30 | }, 31 | "extra": { 32 | "branch-alias": { 33 | "dev-master": "1.6.x-dev" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/.static/.mongodb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/Learning-MongoDB-2835008/8b19040a64b16bfd9387ec311619cc80878b1b3d/lessons/5.3/vendor/mongodb/mongodb/docs/.static/.mongodb -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: session 4 | post: | 5 | .. versionadded:: 1.3 6 | --- 7 | source: 8 | file: apiargs-common-option.yaml 9 | ref: typeMap 10 | post: | 11 | This will be used for the returned command result document. 12 | --- 13 | source: 14 | file: apiargs-MongoDBClient-common-option.yaml 15 | ref: writeConcern 16 | post: | 17 | This is not supported for server versions prior to 3.4 and will result in an 18 | exception at execution time if used. 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $databaseName 4 | replacement: 5 | action: " to drop" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-get-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $databaseName 4 | replacement: 5 | action: " to select" 6 | ... 7 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml: -------------------------------------------------------------------------------- 1 | arg_name: option 2 | name: filter 3 | type: array|object 4 | description: | 5 | A query expression to filter the list of databases. 6 | 7 | You can specify a query expression for database fields (e.g. ``name``, 8 | ``sizeOnDisk``, ``empty``). 9 | 10 | .. versionadded:: 1.3 11 | interface: phpmethod 12 | operation: ~ 13 | optional: true 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: maxTimeMS 18 | --- 19 | source: 20 | file: apiargs-common-option.yaml 21 | ref: session 22 | post: | 23 | .. versionadded:: 1.3 24 | ... 25 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "collection" 6 | parent: "client" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "collection" 13 | parent: "client" 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: typeMap 18 | replacement: 19 | parent: "client" 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: writeConcern 24 | replacement: 25 | resource: "collection" 26 | parent: "client" 27 | ... 28 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $databaseName 4 | replacement: 5 | action: " containing the collection to select" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $collectionName 10 | replacement: 11 | action: " to select" 12 | --- 13 | source: 14 | file: apiargs-common-param.yaml 15 | ref: $options 16 | ... 17 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "database" 6 | parent: "client" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "database" 13 | parent: "client" 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: typeMap 18 | replacement: 19 | parent: "client" 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: writeConcern 24 | replacement: 25 | resource: "database" 26 | parent: "client" 27 | ... 28 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $databaseName 4 | replacement: 5 | action: " to select" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | source: 3 | file: apiargs-method-watch-option.yaml 4 | ref: batchSize 5 | --- 6 | source: 7 | file: apiargs-common-option.yaml 8 | ref: collation 9 | --- 10 | source: 11 | file: apiargs-method-watch-option.yaml 12 | ref: fullDocument 13 | --- 14 | source: 15 | file: apiargs-method-watch-option.yaml 16 | ref: maxAwaitTimeMS 17 | --- 18 | source: 19 | file: apiargs-MongoDBClient-common-option.yaml 20 | ref: readConcern 21 | --- 22 | source: 23 | file: apiargs-MongoDBClient-common-option.yaml 24 | ref: readPreference 25 | post: | 26 | This is used for both the initial change stream aggregation and for 27 | server selection during an automatic resume. 28 | --- 29 | source: 30 | file: apiargs-method-watch-option.yaml 31 | ref: resumeAfter 32 | --- 33 | source: 34 | file: apiargs-common-option.yaml 35 | ref: session 36 | --- 37 | source: 38 | file: apiargs-method-watch-option.yaml 39 | ref: startAfter 40 | post: | 41 | .. versionadded: 1.5 42 | --- 43 | source: 44 | file: apiargs-method-watch-option.yaml 45 | ref: startAtOperationTime 46 | --- 47 | source: 48 | file: apiargs-MongoDBClient-common-option.yaml 49 | ref: typeMap 50 | ... 51 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-method-watch-param.yaml 3 | ref: $pipeline 4 | --- 5 | source: 6 | file: apiargs-method-watch-param.yaml 7 | ref: $options 8 | ... 9 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-common-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $filter 3 | type: array|object 4 | description: | 5 | The filter criteria that specifies the documents{{action}}. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | replacement: 10 | action: "" 11 | --- 12 | arg_name: param 13 | name: $replacement 14 | type: array|object 15 | description: | 16 | The replacement document. 17 | interface: phpmethod 18 | operation: ~ 19 | optional: false 20 | --- 21 | arg_name: param 22 | name: $update 23 | type: array|object 24 | description: | 25 | Specifies the field and value combinations to update and any relevant update 26 | operators. ``$update`` uses MongoDB's :method:`update operators 27 | `. Starting with MongoDB 4.2, an `aggregation 28 | pipeline `_ 29 | can be passed as this parameter. 30 | interface: phpmethod 31 | operation: ~ 32 | optional: false 33 | ... 34 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $pipeline 3 | type: array 4 | description: | 5 | Specifies an :manual:`aggregation pipeline ` 6 | operation. 7 | interface: phpmethod 8 | operation: ~ 9 | optional: false 10 | --- 11 | source: 12 | file: apiargs-common-param.yaml 13 | ref: $options 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: bypassDocumentValidation 4 | --- 5 | arg_name: option 6 | name: ordered 7 | type: boolean 8 | description: | 9 | If ``true``: when a single write fails, the operation will stop without 10 | performing the remaining writes and throw an exception. 11 | 12 | If ``false``: when a single write fails, the operation will continue with the 13 | remaining writes, if any, and throw an exception. 14 | 15 | The default is ``true``. 16 | interface: phpmethod 17 | operation: ~ 18 | optional: true 19 | --- 20 | source: 21 | file: apiargs-common-option.yaml 22 | ref: session 23 | post: | 24 | .. versionadded:: 1.3 25 | --- 26 | source: 27 | file: apiargs-MongoDBCollection-common-option.yaml 28 | ref: writeConcern 29 | ... 30 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "collection" 6 | parent: "manager" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "collection" 13 | parent: "manager" 14 | --- 15 | source: 16 | file: apiargs-MongoDBClient-method-construct-driverOptions.yaml 17 | ref: typeMap 18 | --- 19 | source: 20 | file: apiargs-common-option.yaml 21 | ref: writeConcern 22 | replacement: 23 | resource: "collection" 24 | parent: "manager" 25 | ... 26 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $manager 4 | --- 5 | source: 6 | file: apiargs-common-param.yaml 7 | ref: $databaseName 8 | --- 9 | source: 10 | file: apiargs-common-param.yaml 11 | ref: $collectionName 12 | --- 13 | source: 14 | file: apiargs-common-param.yaml 15 | ref: $options 16 | ... 17 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: true 5 | replacement: 6 | action: " to count" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: true 5 | replacement: 6 | action: " to count" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $key 3 | type: array|object 4 | description: | 5 | Specifies the field or fields to index and the index order. 6 | 7 | For example, the following specifies a descending index on the ``username`` 8 | field: 9 | 10 | .. code-block:: php 11 | 12 | [ 'username' => -1 ] 13 | interface: phpmethod 14 | operation: ~ 15 | optional: false 16 | --- 17 | source: 18 | file: apiargs-common-param.yaml 19 | ref: $options 20 | ... 21 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: maxTimeMS 4 | post: | 5 | .. versionadded:: 1.3 6 | --- 7 | source: 8 | file: apiargs-common-option.yaml 9 | ref: session 10 | post: | 11 | .. versionadded:: 1.3 12 | --- 13 | source: 14 | file: apiargs-MongoDBCollection-common-option.yaml 15 | ref: writeConcern 16 | post: | 17 | This is not supported for server versions prior to 3.4 and will result in an 18 | exception at execution time if used. 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $indexes 3 | type: array 4 | description: | 5 | The indexes to create on the collection. 6 | 7 | For example, the following specifies a unique index on the ``username`` field 8 | and a compound index on the ``email`` and ``createdAt`` fields: 9 | 10 | .. code-block:: php 11 | 12 | [ 13 | [ 'key' => [ 'username' => -1 ], 'unique' => true ], 14 | [ 'key' => [ 'email' => 1, 'createdAt' => 1 ] ], 15 | ] 16 | interface: phpmethod 17 | operation: ~ 18 | optional: false 19 | --- 20 | source: 21 | file: apiargs-common-param.yaml 22 | ref: $options 23 | ... 24 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: collation 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: session 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: writeConcern 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to delete" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: collation 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: session 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: writeConcern 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to delete" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: collation 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: maxTimeMS 8 | --- 9 | source: 10 | file: apiargs-MongoDBCollection-common-option.yaml 11 | ref: readConcern 12 | --- 13 | source: 14 | file: apiargs-MongoDBCollection-common-option.yaml 15 | ref: readPreference 16 | --- 17 | source: 18 | file: apiargs-common-option.yaml 19 | ref: session 20 | post: | 21 | .. versionadded:: 1.3 22 | --- 23 | source: 24 | file: apiargs-MongoDBCollection-common-option.yaml 25 | ref: typeMap 26 | post: | 27 | .. versionadded:: 1.5 28 | ... 29 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $fieldName 3 | type: string 4 | description: | 5 | The field for which to return distinct values. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | source: 11 | file: apiargs-MongoDBCollection-common-param.yaml 12 | ref: $filter 13 | optional: true 14 | replacement: 15 | action: " from which to retrieve the distinct values" 16 | --- 17 | source: 18 | file: apiargs-common-param.yaml 19 | ref: $options 20 | ... 21 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: typeMap 4 | post: | 5 | This will be used for the returned command result document. 6 | --- 7 | source: 8 | file: apiargs-common-option.yaml 9 | ref: session 10 | post: | 11 | .. versionadded:: 1.3 12 | --- 13 | source: 14 | file: apiargs-MongoDBCollection-common-option.yaml 15 | ref: writeConcern 16 | post: | 17 | This is not supported for server versions prior to 3.4 and will result in an 18 | exception at execution time if used. 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: maxTimeMS 4 | post: | 5 | .. versionadded:: 1.3 6 | --- 7 | source: 8 | file: apiargs-common-option.yaml 9 | ref: session 10 | post: | 11 | .. versionadded:: 1.3 12 | --- 13 | source: 14 | file: apiargs-MongoDBCollection-common-option.yaml 15 | ref: typeMap 16 | post: | 17 | This will be used for the returned command result document. 18 | --- 19 | source: 20 | file: apiargs-MongoDBCollection-common-option.yaml 21 | ref: writeConcern 22 | post: | 23 | This is not supported for server versions prior to 3.4 and will result in an 24 | exception at execution time if used. 25 | ... 26 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $indexName 3 | type: string| :phpclass:`MongoDB\\Model\\IndexInfo` 4 | description: | 5 | The name or model object of the index to drop. View the existing indexes on 6 | the collection using the :phpmethod:`listIndexes() 7 | ` method. 8 | interface: phpmethod 9 | operation: ~ 10 | optional: false 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: maxTimeMS 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: session 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: typeMap 14 | post: | 15 | This will be used for the returned command result document. 16 | --- 17 | source: 18 | file: apiargs-MongoDBCollection-common-option.yaml 19 | ref: writeConcern 20 | post: | 21 | This is not supported for server versions prior to 3.4 and will result in an 22 | exception at execution time if used. 23 | ... 24 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: maxTimeMS 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-common-option.yaml 7 | ref: readConcern 8 | --- 9 | source: 10 | file: apiargs-MongoDBCollection-common-option.yaml 11 | ref: readPreference 12 | --- 13 | source: 14 | file: apiargs-common-option.yaml 15 | ref: session 16 | ... 17 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: readPreference 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-common-option.yaml 7 | ref: typeMap 8 | post: | 9 | This will be used for the returned command result document. 10 | --- 11 | arg_name: option 12 | name: verbosity 13 | type: string 14 | description: | 15 | The verbosity level at which to run the command. See the :manual:`explain 16 | ` command for more information. 17 | interface: phpmethod 18 | operation: ~ 19 | optional: true 20 | ... 21 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $explainable 3 | type: :phpclass:`MongoDB\\Operation\\Explainable` 4 | description: | 5 | The command to explain. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | source: 11 | file: apiargs-common-param.yaml 12 | ref: $options 13 | ... 14 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: true 5 | replacement: 6 | action: " to query" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: true 5 | replacement: 6 | action: " to query" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-method-find-option.yaml 3 | ref: projection 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-method-find-option.yaml 7 | ref: sort 8 | --- 9 | source: 10 | file: apiargs-MongoDBCollection-common-option.yaml 11 | ref: collation 12 | --- 13 | source: 14 | file: apiargs-common-option.yaml 15 | ref: maxTimeMS 16 | --- 17 | source: 18 | file: apiargs-common-option.yaml 19 | ref: session 20 | post: | 21 | .. versionadded:: 1.3 22 | --- 23 | source: 24 | file: apiargs-MongoDBCollection-common-option.yaml 25 | ref: typeMap 26 | post: | 27 | This will be used for the returned result document. 28 | --- 29 | source: 30 | file: apiargs-MongoDBCollection-common-option.yaml 31 | ref: writeConcern 32 | post: | 33 | This is not supported for server versions prior to 3.2 and will result in an 34 | exception at execution time if used. 35 | ... 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to delete" 7 | --- 8 | source: 9 | file: apiargs-common-param.yaml 10 | ref: $options 11 | ... 12 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to replace" 7 | --- 8 | source: 9 | file: apiargs-MongoDBCollection-common-param.yaml 10 | ref: $replacement 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to update" 7 | --- 8 | source: 9 | file: apiargs-MongoDBCollection-common-param.yaml 10 | ref: $update 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: bypassDocumentValidation 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml 7 | ref: ordered 8 | --- 9 | source: 10 | file: apiargs-common-option.yaml 11 | ref: session 12 | post: | 13 | .. versionadded:: 1.3 14 | --- 15 | source: 16 | file: apiargs-MongoDBCollection-common-option.yaml 17 | ref: writeConcern 18 | ... 19 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $documents 3 | type: array 4 | description: | 5 | The documents to insert into the collection. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | source: 11 | file: apiargs-common-param.yaml 12 | ref: $options 13 | ... 14 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: bypassDocumentValidation 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: session 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: writeConcern 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $document 3 | type: array|object 4 | description: | 5 | The document to insert into the collection. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | source: 11 | file: apiargs-common-param.yaml 12 | ref: $options 13 | ... 14 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: maxTimeMS 4 | --- 5 | source: 6 | file: apiargs-common-option.yaml 7 | ref: session 8 | post: | 9 | .. versionadded:: 1.3 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: upsert 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-common-option.yaml 7 | ref: bypassDocumentValidation 8 | --- 9 | source: 10 | file: apiargs-MongoDBCollection-common-option.yaml 11 | ref: collation 12 | --- 13 | source: 14 | file: apiargs-common-option.yaml 15 | ref: hint 16 | post: | 17 | This option is available in MongoDB 4.2+ and will result in an exception at 18 | execution time if specified for an older server version. 19 | 20 | .. versionadded:: 1.6 21 | --- 22 | source: 23 | file: apiargs-common-option.yaml 24 | ref: session 25 | post: | 26 | .. versionadded:: 1.3 27 | --- 28 | source: 29 | file: apiargs-MongoDBCollection-common-option.yaml 30 | ref: writeConcern 31 | ... 32 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to replace" 7 | --- 8 | source: 9 | file: apiargs-MongoDBCollection-common-param.yaml 10 | ref: $replacement 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: upsert 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-common-option.yaml 7 | ref: arrayFilters 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: bypassDocumentValidation 14 | --- 15 | source: 16 | file: apiargs-MongoDBCollection-common-option.yaml 17 | ref: collation 18 | --- 19 | source: 20 | file: apiargs-common-option.yaml 21 | ref: hint 22 | post: | 23 | This option is available in MongoDB 4.2+ and will result in an exception at 24 | execution time if specified for an older server version. 25 | 26 | .. versionadded:: 1.6 27 | --- 28 | source: 29 | file: apiargs-common-option.yaml 30 | ref: session 31 | post: | 32 | .. versionadded:: 1.3 33 | --- 34 | source: 35 | file: apiargs-MongoDBCollection-common-option.yaml 36 | ref: writeConcern 37 | ... 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to update" 7 | --- 8 | source: 9 | file: apiargs-MongoDBCollection-common-param.yaml 10 | ref: $update 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-option.yaml 3 | ref: upsert 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-common-option.yaml 7 | ref: arrayFilters 8 | post: | 9 | .. versionadded:: 1.3 10 | --- 11 | source: 12 | file: apiargs-MongoDBCollection-common-option.yaml 13 | ref: bypassDocumentValidation 14 | --- 15 | source: 16 | file: apiargs-MongoDBCollection-common-option.yaml 17 | ref: collation 18 | --- 19 | source: 20 | file: apiargs-common-option.yaml 21 | ref: hint 22 | post: | 23 | This option is available in MongoDB 4.2+ and will result in an exception at 24 | execution time if specified for an older server version. 25 | 26 | .. versionadded:: 1.6 27 | --- 28 | source: 29 | file: apiargs-common-option.yaml 30 | ref: session 31 | post: | 32 | .. versionadded:: 1.3 33 | --- 34 | source: 35 | file: apiargs-MongoDBCollection-common-option.yaml 36 | ref: writeConcern 37 | ... 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-common-param.yaml 3 | ref: $filter 4 | optional: false 5 | replacement: 6 | action: " to update" 7 | --- 8 | source: 9 | file: apiargs-MongoDBCollection-common-param.yaml 10 | ref: $update 11 | --- 12 | source: 13 | file: apiargs-common-param.yaml 14 | ref: $options 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | source: 3 | file: apiargs-method-watch-option.yaml 4 | ref: batchSize 5 | --- 6 | source: 7 | file: apiargs-common-option.yaml 8 | ref: collation 9 | --- 10 | source: 11 | file: apiargs-method-watch-option.yaml 12 | ref: fullDocument 13 | --- 14 | source: 15 | file: apiargs-method-watch-option.yaml 16 | ref: maxAwaitTimeMS 17 | --- 18 | source: 19 | file: apiargs-MongoDBCollection-common-option.yaml 20 | ref: readConcern 21 | --- 22 | source: 23 | file: apiargs-MongoDBCollection-common-option.yaml 24 | ref: readPreference 25 | post: | 26 | This is used for both the initial change stream aggregation and for 27 | server selection during an automatic resume. 28 | --- 29 | source: 30 | file: apiargs-method-watch-option.yaml 31 | ref: resumeAfter 32 | --- 33 | source: 34 | file: apiargs-common-option.yaml 35 | ref: session 36 | --- 37 | source: 38 | file: apiargs-method-watch-option.yaml 39 | ref: startAfter 40 | post: | 41 | .. versionadded: 1.5 42 | --- 43 | source: 44 | file: apiargs-method-watch-option.yaml 45 | ref: startAtOperationTime 46 | post: | 47 | .. versionadded:: 1.4 48 | --- 49 | source: 50 | file: apiargs-MongoDBCollection-common-option.yaml 51 | ref: typeMap 52 | ... 53 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-method-watch-param.yaml 3 | ref: $pipeline 4 | --- 5 | source: 6 | file: apiargs-method-watch-param.yaml 7 | ref: $options 8 | ... 9 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "collection" 6 | parent: "original collection" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "collection" 13 | parent: "original collection" 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: typeMap 18 | replacement: 19 | parent: "original collection" 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: writeConcern 24 | replacement: 25 | resource: "collection" 26 | parent: "original collection" 27 | ... 28 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $pipeline 3 | type: array 4 | description: | 5 | Specifies an :manual:`aggregation pipeline ` 6 | operation. 7 | interface: phpmethod 8 | operation: ~ 9 | optional: false 10 | --- 11 | source: 12 | file: apiargs-common-param.yaml 13 | ref: $options 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readPreference 4 | description: | 5 | :manual:`Read preference ` to use for the 6 | operation. Defaults to the database's read preference. 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: session 11 | post: | 12 | .. versionadded:: 1.3 13 | --- 14 | source: 15 | file: apiargs-MongoDBDatabase-common-option.yaml 16 | ref: typeMap 17 | ... 18 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $command 3 | type: array|object 4 | description: | 5 | The :manual:`database command ` document. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | source: 11 | file: apiargs-common-param.yaml 12 | ref: $options 13 | ... 14 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "database" 6 | parent: "manager" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "database" 13 | parent: "manager" 14 | --- 15 | source: 16 | file: apiargs-MongoDBClient-method-construct-driverOptions.yaml 17 | ref: typeMap 18 | --- 19 | source: 20 | file: apiargs-common-option.yaml 21 | ref: writeConcern 22 | replacement: 23 | resource: "database" 24 | parent: "manager" 25 | ... 26 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $manager 4 | --- 5 | source: 6 | file: apiargs-common-param.yaml 7 | ref: $databaseName 8 | --- 9 | source: 10 | file: apiargs-common-param.yaml 11 | ref: $options 12 | ... 13 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $collectionName 4 | replacement: 5 | action: " to create" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: session 4 | post: | 5 | .. versionadded:: 1.3 6 | --- 7 | source: 8 | file: apiargs-MongoDBDatabase-common-option.yaml 9 | ref: typeMap 10 | post: | 11 | This will be used for the returned command result document. 12 | --- 13 | source: 14 | file: apiargs-MongoDBDatabase-common-option.yaml 15 | ref: writeConcern 16 | post: | 17 | This is not supported for server versions prior to 3.4 and will result in an 18 | exception at execution time if used. 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: session 4 | post: | 5 | .. versionadded:: 1.3 6 | --- 7 | source: 8 | file: apiargs-MongoDBDatabase-common-option.yaml 9 | ref: typeMap 10 | post: | 11 | This will be used for the returned command result document. 12 | --- 13 | source: 14 | file: apiargs-MongoDBDatabase-common-option.yaml 15 | ref: writeConcern 16 | post: | 17 | This is not supported for server versions prior to 3.4 and will result in an 18 | exception at execution time if used. 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $collectionName 4 | replacement: 5 | action: " to drop" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $collectionName 4 | replacement: 5 | action: " to select" 6 | ... 7 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml: -------------------------------------------------------------------------------- 1 | arg_name: option 2 | name: filter 3 | type: array|object 4 | description: | 5 | A query expression to filter the list of collections. 6 | 7 | You can specify a query expression for collection fields (e.g. ``name``, 8 | ``options``). 9 | interface: phpmethod 10 | operation: ~ 11 | optional: true 12 | --- 13 | source: 14 | file: apiargs-common-option.yaml 15 | ref: maxTimeMS 16 | --- 17 | source: 18 | file: apiargs-common-option.yaml 19 | ref: session 20 | post: | 21 | .. versionadded:: 1.3 22 | ... 23 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: session 4 | --- 5 | source: 6 | file: apiargs-MongoDBDatabase-common-option.yaml 7 | ref: typeMap 8 | post: | 9 | This will be used for the returned command result document. 10 | --- 11 | source: 12 | file: apiargs-MongoDBDatabase-common-option.yaml 13 | ref: writeConcern 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $collectionName 4 | replacement: 5 | subject: "collection or view" 6 | action: " to modify" 7 | --- 8 | arg_name: param 9 | name: $collectionOptions 10 | type: array 11 | description: | 12 | Collection or view options to assign. 13 | interface: phpmethod 14 | operation: ~ 15 | optional: false 16 | --- 17 | source: 18 | file: apiargs-common-param.yaml 19 | ref: $options 20 | ... 21 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "collection" 6 | parent: "database" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "collection" 13 | parent: "database" 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: typeMap 18 | replacement: 19 | parent: "database" 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: writeConcern 24 | replacement: 25 | resource: "collection" 26 | parent: "database" 27 | ... 28 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $collectionName 4 | replacement: 5 | action: " to select" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml: -------------------------------------------------------------------------------- 1 | arg_name: option 2 | name: bucketName 3 | type: string 4 | description: | 5 | The bucket name, which will be used as a prefix for the files and chunks 6 | collections. Defaults to ``"fs"``. 7 | interface: phpmethod 8 | operation: ~ 9 | optional: true 10 | --- 11 | arg_name: option 12 | name: chunkSizeBytes 13 | type: integer 14 | description: | 15 | The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). 16 | interface: phpmethod 17 | operation: ~ 18 | optional: true 19 | --- 20 | source: 21 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 22 | ref: disableMD5 23 | post: | 24 | .. versionadded: 1.4 25 | --- 26 | source: 27 | file: apiargs-common-option.yaml 28 | ref: readConcern 29 | replacement: 30 | resource: "bucket" 31 | parent: "database" 32 | --- 33 | source: 34 | file: apiargs-common-option.yaml 35 | ref: readPreference 36 | replacement: 37 | resource: "bucket" 38 | parent: "database" 39 | --- 40 | source: 41 | file: apiargs-common-option.yaml 42 | ref: typeMap 43 | replacement: 44 | parent: "database" 45 | --- 46 | source: 47 | file: apiargs-common-option.yaml 48 | ref: writeConcern 49 | replacement: 50 | resource: "bucket" 51 | parent: "database" 52 | ... 53 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | source: 3 | file: apiargs-method-watch-option.yaml 4 | ref: batchSize 5 | --- 6 | source: 7 | file: apiargs-common-option.yaml 8 | ref: collation 9 | --- 10 | source: 11 | file: apiargs-method-watch-option.yaml 12 | ref: fullDocument 13 | --- 14 | source: 15 | file: apiargs-method-watch-option.yaml 16 | ref: maxAwaitTimeMS 17 | --- 18 | source: 19 | file: apiargs-MongoDBDatabase-common-option.yaml 20 | ref: readConcern 21 | --- 22 | source: 23 | file: apiargs-MongoDBDatabase-common-option.yaml 24 | ref: readPreference 25 | post: | 26 | This is used for both the initial change stream aggregation and for 27 | server selection during an automatic resume. 28 | --- 29 | source: 30 | file: apiargs-method-watch-option.yaml 31 | ref: resumeAfter 32 | --- 33 | source: 34 | file: apiargs-common-option.yaml 35 | ref: session 36 | --- 37 | source: 38 | file: apiargs-method-watch-option.yaml 39 | ref: startAfter 40 | post: | 41 | .. versionadded: 1.5 42 | --- 43 | source: 44 | file: apiargs-method-watch-option.yaml 45 | ref: startAtOperationTime 46 | --- 47 | source: 48 | file: apiargs-MongoDBDatabase-common-option.yaml 49 | ref: typeMap 50 | ... 51 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-method-watch-param.yaml 3 | ref: $pipeline 4 | --- 5 | source: 6 | file: apiargs-method-watch-param.yaml 7 | ref: $options 8 | ... 9 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-option.yaml 3 | ref: readConcern 4 | replacement: 5 | resource: "database" 6 | parent: "original database" 7 | --- 8 | source: 9 | file: apiargs-common-option.yaml 10 | ref: readPreference 11 | replacement: 12 | resource: "database" 13 | parent: "original database" 14 | --- 15 | source: 16 | file: apiargs-common-option.yaml 17 | ref: typeMap 18 | replacement: 19 | parent: "original database" 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: writeConcern 24 | replacement: 25 | resource: "database" 26 | parent: "original database" 27 | ... 28 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $options 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $filename 3 | type: string 4 | description: | 5 | The ``filename`` of the file{{action}}. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | replacement: 10 | action: "" 11 | --- 12 | arg_name: param 13 | name: $id 14 | type: mixed 15 | description: | 16 | The ``_id`` of the file{{action}}. 17 | interface: phpmethod 18 | operation: ~ 19 | optional: false 20 | replacement: 21 | action: "" 22 | --- 23 | arg_name: param 24 | name: $stream 25 | type: resource 26 | description: | 27 | The GridFS stream resource. 28 | interface: phpmethod 29 | operation: ~ 30 | --- 31 | arg_name: param 32 | name: $destination 33 | type: resource 34 | description: | 35 | Writable stream, to which the GridFS file's contents will be written. 36 | interface: phpmethod 37 | operation: ~ 38 | optional: false 39 | ... 40 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml: -------------------------------------------------------------------------------- 1 | arg_name: option 2 | name: bucketName 3 | type: string 4 | description: | 5 | The bucket name, which will be used as a prefix for the files and chunks 6 | collections. Defaults to ``"fs"``. 7 | interface: phpmethod 8 | operation: ~ 9 | optional: true 10 | --- 11 | arg_name: option 12 | name: chunkSizeBytes 13 | type: integer 14 | description: | 15 | The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). 16 | interface: phpmethod 17 | operation: ~ 18 | optional: true 19 | --- 20 | source: 21 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 22 | ref: disableMD5 23 | post: | 24 | .. versionadded: 1.4 25 | --- 26 | source: 27 | file: apiargs-common-option.yaml 28 | ref: readConcern 29 | replacement: 30 | resource: "bucket" 31 | parent: "database" 32 | --- 33 | source: 34 | file: apiargs-common-option.yaml 35 | ref: readPreference 36 | replacement: 37 | resource: "bucket" 38 | parent: "database" 39 | --- 40 | source: 41 | file: apiargs-MongoDBClient-method-construct-driverOptions.yaml 42 | ref: typeMap 43 | --- 44 | source: 45 | file: apiargs-common-option.yaml 46 | ref: writeConcern 47 | replacement: 48 | resource: "bucket" 49 | parent: "database" 50 | ... 51 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-common-param.yaml 3 | ref: $manager 4 | --- 5 | source: 6 | file: apiargs-common-param.yaml 7 | ref: $databaseName 8 | --- 9 | source: 10 | file: apiargs-common-param.yaml 11 | ref: $options 12 | ... 13 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $id 4 | replacement: 5 | resource: " to delete" 6 | ... 7 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $id 4 | replacement: 5 | resource: " to download" 6 | --- 7 | source: 8 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 9 | ref: $destination 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 3 | ref: revision 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $filename 4 | replacement: 5 | resource: " to download" 6 | --- 7 | source: 8 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 9 | ref: $destination 10 | --- 11 | source: 12 | file: apiargs-common-param.yaml 13 | ref: $options 14 | ... 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBCollection-method-find-option.yaml 3 | ref: projection 4 | --- 5 | source: 6 | file: apiargs-MongoDBCollection-method-find-option.yaml 7 | ref: sort 8 | --- 9 | source: 10 | file: apiargs-MongoDBCollection-method-find-option.yaml 11 | ref: skip 12 | --- 13 | source: 14 | file: apiargs-MongoDBCollection-common-option.yaml 15 | ref: collation 16 | --- 17 | source: 18 | file: apiargs-MongoDBCollection-method-find-option.yaml 19 | ref: comment 20 | --- 21 | source: 22 | file: apiargs-common-option.yaml 23 | ref: maxTimeMS 24 | --- 25 | source: 26 | file: apiargs-MongoDBCollection-method-find-option.yaml 27 | ref: readConcern 28 | --- 29 | source: 30 | file: apiargs-MongoDBGridFSBucket-method-find-option.yaml 31 | ref: readPreference 32 | --- 33 | source: 34 | file: apiargs-MongoDBGridFSBucket-method-find-option.yaml 35 | ref: typeMap 36 | post: | 37 | This will be used for the returned result document. 38 | --- 39 | source: 40 | file: apiargs-MongoDBCollection-method-find-option.yaml 41 | ref: modifiers 42 | ... 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $stream 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $stream 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $id 4 | replacement: 5 | resource: " to download" 6 | ... 7 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 3 | ref: revision 4 | ... 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $filename 4 | replacement: 5 | resource: " to download" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 3 | ref: _id 4 | --- 5 | source: 6 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 7 | ref: chunkSizeBytes 8 | --- 9 | source: 10 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 11 | ref: disableMD5 12 | post: | 13 | .. versionadded: 1.4 14 | --- 15 | source: 16 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 17 | ref: metadata 18 | ... 19 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $filename 4 | replacement: 5 | resource: " to create" 6 | --- 7 | source: 8 | file: apiargs-common-param.yaml 9 | ref: $options 10 | ... 11 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $id 4 | replacement: 5 | resource: " to rename" 6 | --- 7 | arg_name: param 8 | name: $newFilename 9 | type: string 10 | description: | 11 | The new ``filename`` value. 12 | interface: phpmethod 13 | operation: ~ 14 | optional: false 15 | ... 16 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 3 | ref: _id 4 | --- 5 | source: 6 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 7 | ref: chunkSizeBytes 8 | --- 9 | source: 10 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 11 | ref: disableMD5 12 | post: | 13 | .. versionadded: 1.4 14 | --- 15 | source: 16 | file: apiargs-MongoDBGridFSBucket-common-option.yaml 17 | ref: metadata 18 | ... 19 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml: -------------------------------------------------------------------------------- 1 | source: 2 | file: apiargs-MongoDBGridFSBucket-common-param.yaml 3 | ref: $filename 4 | replacement: 5 | resource: " to create" 6 | --- 7 | arg_name: param 8 | name: $source 9 | type: resource 10 | description: | 11 | Readable stream, from which the new GridFS file's contents will be read. 12 | interface: phpmethod 13 | operation: ~ 14 | optional: false 15 | --- 16 | source: 17 | file: apiargs-common-param.yaml 18 | ref: $options 19 | ... 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-common-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $manager 3 | type: :php:`MongoDB\\Driver\\Manager ` 4 | description: | 5 | The :php:`Manager ` instance from the driver. The 6 | manager maintains connections between the driver and your MongoDB instances. 7 | interface: phpmethod 8 | operation: ~ 9 | optional: false 10 | --- 11 | arg_name: param 12 | name: $databaseName 13 | type: string 14 | description: | 15 | The name of the database{{action}}. 16 | interface: phpmethod 17 | operation: ~ 18 | optional: false 19 | replacement: 20 | action: "" 21 | --- 22 | arg_name: param 23 | name: $collectionName 24 | type: string 25 | description: | 26 | The name of the {{subject}}{{action}}. 27 | interface: phpmethod 28 | operation: ~ 29 | optional: false 30 | replacement: 31 | subject: "collection" 32 | action: "" 33 | --- 34 | arg_name: param 35 | name: $options 36 | type: array 37 | description: | 38 | An array specifying the desired options. 39 | interface: phpmethod 40 | operation: ~ 41 | optional: true 42 | ... 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-function-with_transaction-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $session 3 | type: :php:`MongoDB\\Driver\\Session ` 4 | description: | 5 | A client session used to execute the transaction. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: false 9 | --- 10 | arg_name: param 11 | name: $callback 12 | type: callback 13 | description: | 14 | A callback that will be run inside the transaction. The callback must accept a 15 | :php:`MongoDB\\Driver\\Session ` object as first 16 | argument. 17 | interface: phpmethod 18 | operation: ~ 19 | optional: false 20 | --- 21 | arg_name: param 22 | name: $transactionOptions 23 | type: array 24 | description: | 25 | Transaction options, which will be passed to 26 | :php:`MongoDB\\Driver\\Session::startTransaction `. 27 | See the extension documentation for a list of supported options. 28 | interface: phpmethod 29 | operation: ~ 30 | optional: true 31 | ... 32 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/apiargs-method-watch-param.yaml: -------------------------------------------------------------------------------- 1 | arg_name: param 2 | name: $pipeline 3 | type: array|object 4 | description: | 5 | The pipeline of stages to append to an initial ``$changeStream`` stage. 6 | interface: phpmethod 7 | operation: ~ 8 | optional: true 9 | --- 10 | source: 11 | file: apiargs-common-param.yaml 12 | ref: $options 13 | ... 14 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/extracts-bulkwriteexception.yaml: -------------------------------------------------------------------------------- 1 | ref: bulkwriteexception-result 2 | content: | 3 | If a :php:`MongoDB\\Driver\\Exception\\BulkWriteException 4 | ` is thrown, users should call 5 | :php:`getWriteResult() ` and 6 | inspect the returned :php:`MongoDB\\Driver\\WriteResult 7 | ` object to determine the nature of the error. 8 | 9 | For example, a write operation may have been successfully applied to the 10 | primary server but failed to satisfy the write concern (e.g. replication took 11 | too long). Alternatively, a write operation may have failed outright (e.g. 12 | unique key violation). 13 | --- 14 | ref: bulkwriteexception-ordered 15 | content: | 16 | In the case of a bulk write, the result may indicate multiple successful write 17 | operations and/or errors. If the ``ordered`` option is ``true``, some 18 | operations may have succeeded before the first error was encountered and the 19 | exception thrown. If the ``ordered`` option is ``false``, multiple errors may 20 | have been encountered. 21 | ... 22 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/includes/extracts-note.yaml: -------------------------------------------------------------------------------- 1 | ref: note-bson-comparison 2 | content: | 3 | When evaluating query criteria, MongoDB compares types and values according to 4 | its own :manual:`comparison rules for BSON types 5 | `, which differs from PHP's 6 | :php:`comparison ` and :php:`type juggling 7 | ` rules. When matching a special 8 | BSON type the query criteria should use the respective :php:`BSON class 9 | ` in the driver (e.g. use 10 | :php:`MongoDB\\BSON\\ObjectId ` to match an 11 | :manual:`ObjectId `). 12 | ... 13 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/pretty.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('pre code').parent().addClass('prettyprint well'); 3 | prettyPrint(); 4 | }); 5 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference.txt: -------------------------------------------------------------------------------- 1 | ========= 2 | Reference 3 | ========= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. toctree:: 8 | :titlesonly: 9 | 10 | /reference/bson 11 | /reference/class/MongoDBClient 12 | /reference/class/MongoDBDatabase 13 | /reference/class/MongoDBCollection 14 | /reference/class/MongoDBGridFSBucket 15 | /reference/write-result-classes 16 | /reference/result-classes 17 | /reference/enumeration-classes 18 | /reference/functions 19 | /reference/exception-classes 20 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/functions.txt: -------------------------------------------------------------------------------- 1 | ========= 2 | Functions 3 | ========= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | .. toctree:: 14 | :titlesonly: 15 | 16 | /reference/function/with_transaction 17 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBBulkWriteResult-getDeletedCount.txt: -------------------------------------------------------------------------------- 1 | =========================================== 2 | MongoDB\\BulkWriteResult::getDeletedCount() 3 | =========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\BulkWriteResult::getDeletedCount() 17 | 18 | Return the total number of documents that were deleted by all delete 19 | operations in the bulk write. 20 | 21 | .. code-block:: php 22 | 23 | function getDeletedCount(): integer 24 | 25 | This method should only be called if the write was acknowledged. 26 | 27 | Return Values 28 | ------------- 29 | 30 | The total number of documents that were deleted by all delete operations in the 31 | bulk write. 32 | 33 | Errors/Exceptions 34 | ----------------- 35 | 36 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 37 | 38 | See Also 39 | -------- 40 | 41 | - :php:`MongoDB\\Driver\\WriteResult::getDeletedCount() 42 | ` 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBBulkWriteResult-getInsertedCount.txt: -------------------------------------------------------------------------------- 1 | ============================================ 2 | MongoDB\\BulkWriteResult::getInsertedCount() 3 | ============================================ 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\BulkWriteResult::getInsertedCount() 17 | 18 | Return the total number of documents that were inserted by all insert 19 | operations in the bulk write. 20 | 21 | .. code-block:: php 22 | 23 | function getInsertedCount(): integer 24 | 25 | This method should only be called if the write was acknowledged. 26 | 27 | Return Values 28 | ------------- 29 | 30 | The total number of documents that were inserted by all insert operations in the 31 | bulk write. 32 | 33 | Errors/Exceptions 34 | ----------------- 35 | 36 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 37 | 38 | See Also 39 | -------- 40 | 41 | - :php:`MongoDB\\Driver\\WriteResult::getInsertedCount() 42 | ` 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBBulkWriteResult-getUpsertedCount.txt: -------------------------------------------------------------------------------- 1 | ============================================ 2 | MongoDB\\BulkWriteResult::getUpsertedCount() 3 | ============================================ 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\BulkWriteResult::getUpsertedCount() 17 | 18 | Return the total number of documents that were upserted by all update and 19 | replace operations in the bulk write. 20 | 21 | .. code-block:: php 22 | 23 | function getUpsertedCount(): integer 24 | 25 | This method should only be called if the write was acknowledged. 26 | 27 | Return Values 28 | ------------- 29 | 30 | The total number of documents that were upserted by all update and replace 31 | operations in the bulk write. 32 | 33 | Errors/Exceptions 34 | ----------------- 35 | 36 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 37 | 38 | See Also 39 | -------- 40 | 41 | - :php:`MongoDB\\Driver\\WriteResult::getUpsertedCount() 42 | ` 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBBulkWriteResult-isAcknowledged.txt: -------------------------------------------------------------------------------- 1 | ========================================== 2 | MongoDB\\BulkWriteResult::isAcknowledged() 3 | ========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\BulkWriteResult::isAcknowledged() 17 | 18 | Return whether the write was acknowledged. 19 | 20 | .. code-block:: php 21 | 22 | function isAcknowledged(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the write was acknowledged. 28 | 29 | See Also 30 | -------- 31 | 32 | - :php:`MongoDB\\Driver\\WriteResult::isAcknowledged() 33 | ` 34 | - :manual:`Write Concern ` in the MongoDB manual 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBClient-getManager.txt: -------------------------------------------------------------------------------- 1 | ============================= 2 | MongoDB\\Client::getManager() 3 | ============================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Client::getManager() 17 | 18 | Accessor for the 19 | :php:`MongoDB\\Driver\\Manager ` used by this 20 | :phpclass:`Client `. 21 | 22 | .. code-block:: php 23 | 24 | function getManager(): MongoDB\Manager 25 | 26 | Return Values 27 | ------------- 28 | 29 | A :php:`MongoDB\\Driver\\Manager ` object. 30 | 31 | See Also 32 | -------- 33 | 34 | - :phpmethod:`MongoDB\\Collection::getManager()` 35 | - :phpmethod:`MongoDB\\Database::getManager()` 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-getCollectionName.txt: -------------------------------------------------------------------------------- 1 | ======================================== 2 | MongoDB\\Collection::getCollectionName() 3 | ======================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Collection::getCollectionName() 17 | 18 | Returns the name of this collection. 19 | 20 | .. code-block:: php 21 | 22 | function getCollectionName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The name of this collection as a string. 28 | 29 | Example 30 | ------- 31 | 32 | The following returns the collection name for the ``zips`` collection in the 33 | ``test`` database. 34 | 35 | .. code-block:: php 36 | 37 | test->zips; 40 | 41 | echo $collection->getCollectionName(); 42 | 43 | The output would then resemble:: 44 | 45 | zips 46 | 47 | See Also 48 | -------- 49 | 50 | - :phpmethod:`MongoDB\\Collection::getDatabaseName()` 51 | - :phpmethod:`MongoDB\\Collection::getNamespace()` 52 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-getDatabaseName.txt: -------------------------------------------------------------------------------- 1 | ====================================== 2 | MongoDB\\Collection::getDatabaseName() 3 | ====================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Collection::getDatabaseName() 17 | 18 | Returns the name of the database containing this collection. 19 | 20 | .. code-block:: php 21 | 22 | function getDatabaseName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The name of the database containing this collection as a string. 28 | 29 | Example 30 | ------- 31 | 32 | The following returns the database name for the ``zips`` collection in the 33 | ``test`` database. 34 | 35 | .. code-block:: php 36 | 37 | test->zips; 40 | 41 | echo $collection->getDatabaseName(); 42 | 43 | The output would then resemble:: 44 | 45 | test 46 | 47 | See Also 48 | -------- 49 | 50 | - :phpmethod:`MongoDB\\Collection::getCollectionName()` 51 | - :phpmethod:`MongoDB\\Collection::getNamespace()` 52 | 53 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-getManager.txt: -------------------------------------------------------------------------------- 1 | ================================= 2 | MongoDB\\Collection::getManager() 3 | ================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Collection::getManager() 17 | 18 | Accessor for the 19 | :php:`MongoDB\\Driver\\Manager ` used by this 20 | :phpclass:`Collection `. 21 | 22 | .. code-block:: php 23 | 24 | function getManager(): MongoDB\Manager 25 | 26 | Return Values 27 | ------------- 28 | 29 | A :php:`MongoDB\\Driver\\Manager ` object. 30 | 31 | See Also 32 | -------- 33 | 34 | - :phpmethod:`MongoDB\\Client::getManager()` 35 | - :phpmethod:`MongoDB\\Database::getManager()` 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-getNamespace.txt: -------------------------------------------------------------------------------- 1 | =================================== 2 | MongoDB\\Collection::getNamespace() 3 | =================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Collection::getNamespace() 17 | 18 | Returns the :term:`namespace` of the collection. A namespace is the canonical 19 | name of an index or collection in MongoDB. 20 | 21 | .. code-block:: php 22 | 23 | function getNamespace(): string 24 | 25 | Return Values 26 | ------------- 27 | 28 | The namespace of this collection as a string. 29 | 30 | Example 31 | ------- 32 | 33 | The following returns the namespace of the ``zips`` collection in the ``test`` 34 | database. 35 | 36 | .. code-block:: php 37 | 38 | test->zips; 41 | 42 | echo $collection->getNamespace(); 43 | 44 | The output would then resemble:: 45 | 46 | test.zips 47 | 48 | See Also 49 | -------- 50 | 51 | - :phpmethod:`MongoDB\\Collection::getCollectionName()` 52 | - :phpmethod:`MongoDB\\Collection::getDatabaseName()` 53 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBDatabase-getDatabaseName.txt: -------------------------------------------------------------------------------- 1 | ==================================== 2 | MongoDB\\Database::getDatabaseName() 3 | ==================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Database::getDatabaseName() 17 | 18 | Returns the name of this database. 19 | 20 | .. code-block:: php 21 | 22 | function getDatabaseName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The name of this database as a string. 28 | 29 | Example 30 | ------- 31 | 32 | The following example prints the name of a database object: 33 | 34 | .. code-block:: php 35 | 36 | test; 39 | 40 | echo $db->getDatabaseName(); 41 | 42 | The output would then resemble:: 43 | 44 | test 45 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBDatabase-getManager.txt: -------------------------------------------------------------------------------- 1 | =============================== 2 | MongoDB\\Database::getManager() 3 | =============================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Database::getManager() 17 | 18 | Accessor for the 19 | :php:`MongoDB\\Driver\\Manager ` used by this 20 | :phpclass:`Database `. 21 | 22 | .. code-block:: php 23 | 24 | function getManager(): MongoDB\Manager 25 | 26 | Return Values 27 | ------------- 28 | 29 | A :php:`MongoDB\\Driver\\Manager ` object. 30 | 31 | See Also 32 | -------- 33 | 34 | - :phpmethod:`MongoDB\\Client::getManager()` 35 | - :phpmethod:`MongoDB\\Collection::getManager()` 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBDeleteResult-getDeletedCount.txt: -------------------------------------------------------------------------------- 1 | ======================================== 2 | MongoDB\\DeleteResult::getDeletedCount() 3 | ======================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\DeleteResult::getDeletedCount() 17 | 18 | Return the number of documents that were deleted. 19 | 20 | .. code-block:: php 21 | 22 | function getDeletedCount(): integer 23 | 24 | This method should only be called if the write was acknowledged. 25 | 26 | Return Values 27 | ------------- 28 | 29 | The number of documents that were deleted. 30 | 31 | Errors/Exceptions 32 | ----------------- 33 | 34 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 35 | 36 | See Also 37 | -------- 38 | 39 | - :php:`MongoDB\\Driver\\WriteResult::getDeletedCount() 40 | ` 41 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBDeleteResult-isAcknowledged.txt: -------------------------------------------------------------------------------- 1 | ======================================= 2 | MongoDB\\DeleteResult::isAcknowledged() 3 | ======================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\DeleteResult::isAcknowledged() 17 | 18 | Return whether the write was acknowledged. 19 | 20 | .. code-block:: php 21 | 22 | function isAcknowledged(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the write was acknowledged. 28 | 29 | See Also 30 | -------- 31 | 32 | - :php:`MongoDB\\Driver\\WriteResult::isAcknowledged() 33 | ` 34 | - :manual:`Write Concern ` in the MongoDB manual 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-drop.txt: -------------------------------------------------------------------------------- 1 | =============================== 2 | MongoDB\\GridFS\\Bucket::drop() 3 | =============================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\GridFS\\Bucket::drop() 17 | 18 | Drops the files and chunks collections associated with this GridFS bucket. 19 | 20 | .. code-block:: php 21 | 22 | function drop(): void 23 | 24 | Errors/Exceptions 25 | ----------------- 26 | 27 | .. include:: /includes/extracts/error-driver-runtimeexception.rst 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | test; 37 | 38 | $bucket = $database->selectGridFSBucket(); 39 | 40 | $stream = fopen('php://temp', 'w+b'); 41 | fwrite($stream, "foobar"); 42 | rewind($stream); 43 | 44 | $bucket->uploadFromStream('filename', $stream); 45 | 46 | $bucket->drop(); 47 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-getBucketName.txt: -------------------------------------------------------------------------------- 1 | ======================================== 2 | MongoDB\\GridFS\\Bucket::getBucketName() 3 | ======================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\GridFS\\Bucket::getBucketName() 17 | 18 | Returns the name of this bucket. 19 | 20 | .. code-block:: php 21 | 22 | function getBucketName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The name of this bucket as a string. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | test->selectGridFSBucket(); 37 | 38 | var_dump($bucket->getBucketName()); 39 | 40 | The output would then resemble:: 41 | 42 | string(2) "fs" 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-getChunkSizeBytes.txt: -------------------------------------------------------------------------------- 1 | ============================================ 2 | MongoDB\\GridFS\\Bucket::getChunkSizeBytes() 3 | ============================================ 4 | 5 | .. versionchanged:: 1.2 6 | 7 | .. default-domain:: mongodb 8 | 9 | .. contents:: On this page 10 | :local: 11 | :backlinks: none 12 | :depth: 1 13 | :class: singlecol 14 | 15 | Definition 16 | ---------- 17 | 18 | .. phpmethod:: MongoDB\\GridFS\\Bucket::getChunkSizeBytes() 19 | 20 | Returns the chunk size of this bucket in bytes. 21 | 22 | .. code-block:: php 23 | 24 | function getChunkSizeBytes(): integer 25 | 26 | Return Values 27 | ------------- 28 | 29 | The chunk size of this bucket in bytes. 30 | 31 | Examples 32 | -------- 33 | 34 | .. code-block:: php 35 | 36 | test->selectGridFSBucket(); 39 | 40 | var_dump($bucket->getChunkSizeBytes()); 41 | 42 | The output would then resemble:: 43 | 44 | int(261120) 45 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-getChunksCollection.txt: -------------------------------------------------------------------------------- 1 | ============================================== 2 | MongoDB\\GridFS\\Bucket::getChunksCollection() 3 | ============================================== 4 | 5 | .. versionadded:: 1.2 6 | 7 | .. default-domain:: mongodb 8 | 9 | .. contents:: On this page 10 | :local: 11 | :backlinks: none 12 | :depth: 1 13 | :class: singlecol 14 | 15 | Definition 16 | ---------- 17 | 18 | .. phpmethod:: MongoDB\\GridFS\\Bucket::getChunksCollection() 19 | 20 | Returns the chunks collection used by the bucket. 21 | 22 | .. code-block:: php 23 | 24 | function getChunksCollection(): MongoDB\Collection 25 | 26 | Return Values 27 | ------------- 28 | 29 | A :phpclass:`MongoDB\\Collection` object for the chunks collection. 30 | 31 | Examples 32 | -------- 33 | 34 | .. code-block:: php 35 | 36 | test->selectGridFSBucket(); 39 | 40 | var_dump((string) $bucket->getChunksCollection()); 41 | 42 | The output would then resemble:: 43 | 44 | string(14) "test.fs.chunks" 45 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-getDatabaseName.txt: -------------------------------------------------------------------------------- 1 | ========================================== 2 | MongoDB\\GridFS\\Bucket::getDatabaseName() 3 | ========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\GridFS\\Bucket::getDatabaseName() 17 | 18 | Returns the name of the database containing this bucket. 19 | 20 | .. code-block:: php 21 | 22 | function getDatabaseName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The name of the database containing this bucket as a string. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | test->selectGridFSBucket(); 37 | 38 | var_dump($bucket->getDatabaseName()); 39 | 40 | The output would then resemble:: 41 | 42 | string(4) "test" 43 | 44 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBGridFSBucket-getFilesCollection.txt: -------------------------------------------------------------------------------- 1 | ============================================= 2 | MongoDB\\GridFS\\Bucket::getFilesCollection() 3 | ============================================= 4 | 5 | .. versionadded:: 1.2 6 | 7 | .. default-domain:: mongodb 8 | 9 | .. contents:: On this page 10 | :local: 11 | :backlinks: none 12 | :depth: 1 13 | :class: singlecol 14 | 15 | Definition 16 | ---------- 17 | 18 | .. phpmethod:: MongoDB\\GridFS\\Bucket::getFilesCollection() 19 | 20 | Returns the files collection used by the bucket. 21 | 22 | .. code-block:: php 23 | 24 | function getFilesCollection(): MongoDB\Collection 25 | 26 | Return Values 27 | ------------- 28 | 29 | A :phpclass:`MongoDB\\Collection` object for the files collection. 30 | 31 | Examples 32 | -------- 33 | 34 | .. code-block:: php 35 | 36 | test->selectGridFSBucket(); 39 | 40 | $filesCollection = $bucket->getFilesCollection(); 41 | 42 | var_dump($filesCollection->getCollectionName()); 43 | 44 | The output would then resemble:: 45 | 46 | string(8) "fs.files" 47 | 48 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertManyResult-getInsertedCount.txt: -------------------------------------------------------------------------------- 1 | ============================================= 2 | MongoDB\\InsertManyResult::getInsertedCount() 3 | ============================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertManyResult::getInsertedCount() 17 | 18 | Return the number of documents that were inserted. 19 | 20 | .. code-block:: php 21 | 22 | function getInsertedCount(): integer 23 | 24 | This method should only be called if the write was acknowledged. 25 | 26 | Return Values 27 | ------------- 28 | 29 | The number of documents that were inserted. 30 | 31 | Errors/Exceptions 32 | ----------------- 33 | 34 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 35 | 36 | See Also 37 | -------- 38 | 39 | - :php:`MongoDB\\Driver\\WriteResult::getInsertedCount() 40 | ` 41 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertManyResult-getInsertedIds.txt: -------------------------------------------------------------------------------- 1 | =========================================== 2 | MongoDB\\InsertManyResult::getInsertedIds() 3 | =========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertManyResult::getInsertedIds() 17 | 18 | Return a map of IDs (i.e. ``_id`` field values) for the inserted documents. 19 | 20 | .. code-block:: php 21 | 22 | function getInsertedIds(): array 23 | 24 | Since IDs are created by the driver, this method may be called irrespective 25 | of whether the write was acknowledged. 26 | 27 | Return Values 28 | ------------- 29 | 30 | A map of IDs (i.e. ``_id`` field values) for the inserted documents. 31 | 32 | The index of each ID in the map corresponds to each document's position in the 33 | bulk operation. If a document had an ID prior to inserting (i.e. the driver did 34 | not generate an ID), the index will contain its ``_id`` field value. Any 35 | driver-generated ID will be a :php:`MongoDB\\BSON\\ObjectId 36 | ` instance. 37 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertManyResult-isAcknowledged.txt: -------------------------------------------------------------------------------- 1 | =========================================== 2 | MongoDB\\InsertManyResult::isAcknowledged() 3 | =========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertManyResult::isAcknowledged() 17 | 18 | Return whether the write was acknowledged. 19 | 20 | .. code-block:: php 21 | 22 | function isAcknowledged(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the write was acknowledged. 28 | 29 | See Also 30 | -------- 31 | 32 | - :php:`MongoDB\\Driver\\WriteResult::isAcknowledged() 33 | ` 34 | - :manual:`Write Concern ` in the MongoDB manual 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertOneResult-getInsertedCount.txt: -------------------------------------------------------------------------------- 1 | ============================================ 2 | MongoDB\\InsertOneResult::getInsertedCount() 3 | ============================================ 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertOneResult::getInsertedCount() 17 | 18 | Return the number of documents that were inserted. 19 | 20 | .. code-block:: php 21 | 22 | function getInsertedCount(): integer 23 | 24 | This method should only be called if the write was acknowledged. 25 | 26 | Return Values 27 | ------------- 28 | 29 | The number of documents that were inserted. This should be ``1`` for an 30 | acknowledged insert operation. 31 | 32 | Errors/Exceptions 33 | ----------------- 34 | 35 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 36 | 37 | See Also 38 | -------- 39 | 40 | - :php:`MongoDB\\Driver\\WriteResult::getInsertedCount() 41 | ` 42 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertOneResult-getInsertedId.txt: -------------------------------------------------------------------------------- 1 | ========================================= 2 | MongoDB\\InsertOneResult::getInsertedId() 3 | ========================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertOneResult::getInsertedId() 17 | 18 | Return the ID (i.e. ``_id`` field value) for the inserted document. 19 | 20 | .. code-block:: php 21 | 22 | function getInsertedId(): mixed 23 | 24 | Since IDs are created by the driver, this method may be called irrespective 25 | of whether the write was acknowledged. 26 | 27 | Return Values 28 | ------------- 29 | 30 | The ID (i.e. ``_id`` field value) of the inserted document. 31 | 32 | If the document had an ID prior to inserting (i.e. the driver did not need to 33 | generate an ID), this will contain its ``_id`` field value. Any driver-generated 34 | ID will be a :php:`MongoDB\\BSON\\ObjectId ` 35 | instance. 36 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBInsertOneResult-isAcknowledged.txt: -------------------------------------------------------------------------------- 1 | ========================================== 2 | MongoDB\\InsertOneResult::isAcknowledged() 3 | ========================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\InsertOneResult::isAcknowledged() 17 | 18 | Return whether the write was acknowledged. 19 | 20 | .. code-block:: php 21 | 22 | function isAcknowledged(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the write was acknowledged. 28 | 29 | See Also 30 | -------- 31 | 32 | - :php:`MongoDB\\Driver\\WriteResult::isAcknowledged() 33 | ` 34 | - :manual:`Write Concern ` in the MongoDB manual 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelCollectionInfo-getName.txt: -------------------------------------------------------------------------------- 1 | ========================================= 2 | MongoDB\\Model\\CollectionInfo::getName() 3 | ========================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\CollectionInfo::getName() 17 | 18 | Return the collection name. 19 | 20 | .. code-block:: php 21 | 22 | function getName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The collection name. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | 'foo']); 37 | 38 | echo $info->getName(); 39 | 40 | The output would then resemble:: 41 | 42 | foo 43 | 44 | See Also 45 | -------- 46 | 47 | - :phpmethod:`MongoDB\\Collection::getCollectionName()` 48 | - :manual:`listCollections ` command 49 | reference in the MongoDB manual 50 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelDatabaseInfo-getName.txt: -------------------------------------------------------------------------------- 1 | ======================================= 2 | MongoDB\\Model\\DatabaseInfo::getName() 3 | ======================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\DatabaseInfo::getName() 17 | 18 | Return the database name. 19 | 20 | .. code-block:: php 21 | 22 | function getName(): string 23 | 24 | Return Values 25 | ------------- 26 | 27 | The database name. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | 'foo']); 37 | 38 | echo $info->getName(); 39 | 40 | The output would then resemble:: 41 | 42 | foo 43 | 44 | See Also 45 | -------- 46 | 47 | - :phpmethod:`MongoDB\\Database::getDatabaseName()` 48 | - :manual:`listDatabases ` command reference 49 | in the MongoDB manual 50 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelDatabaseInfo-getSizeOnDisk.txt: -------------------------------------------------------------------------------- 1 | ============================================= 2 | MongoDB\\Model\\DatabaseInfo::getSizeOnDisk() 3 | ============================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\DatabaseInfo::getSizeOnDisk() 17 | 18 | Return the total size of the database file on disk in bytes. 19 | 20 | .. code-block:: php 21 | 22 | function getSizeOnDisk(): integer 23 | 24 | Return Values 25 | ------------- 26 | 27 | The total size of the database file on disk in bytes. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | 1048576]); 37 | 38 | var_dump($info->getSizeOnDisk()); 39 | 40 | The output would then resemble:: 41 | 42 | int(1048576) 43 | 44 | See Also 45 | -------- 46 | 47 | - :manual:`listDatabases ` command reference 48 | in the MongoDB manual 49 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelDatabaseInfo-isEmpty.txt: -------------------------------------------------------------------------------- 1 | ======================================= 2 | MongoDB\\Model\\DatabaseInfo::isEmpty() 3 | ======================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\DatabaseInfo::isEmpty() 17 | 18 | Return whether the database has any data. 19 | 20 | .. code-block:: php 21 | 22 | function isEmpty(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the database has any data. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | true]); 37 | 38 | var_dump($info->isEmpty()); 39 | 40 | The output would then resemble:: 41 | 42 | bool(true) 43 | 44 | See Also 45 | -------- 46 | 47 | - :manual:`listDatabases ` command reference 48 | in the MongoDB manual 49 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelIndexInfo-getName.txt: -------------------------------------------------------------------------------- 1 | ==================================== 2 | MongoDB\\Model\\IndexInfo::getName() 3 | ==================================== 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\IndexInfo::getName() 17 | 18 | Return the index name. This correlates with the return value of 19 | :phpmethod:`MongoDB\\Collection::createIndex()`. An index name may be derived 20 | from the ``$key`` parameter or or explicitly specified via the ``name`` 21 | option. 22 | 23 | .. code-block:: php 24 | 25 | function getName(): string 26 | 27 | Return Values 28 | ------------- 29 | 30 | The index name. 31 | 32 | Examples 33 | -------- 34 | 35 | .. code-block:: php 36 | 37 | 'x_1', 41 | ]); 42 | 43 | echo $info->getName(); 44 | 45 | The output would then resemble:: 46 | 47 | x_1 48 | 49 | See Also 50 | -------- 51 | 52 | - :phpmethod:`MongoDB\\Collection::createIndex()` 53 | - :manual:`listIndexes ` command reference in 54 | the MongoDB manual 55 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelIndexInfo-getNamespace.txt: -------------------------------------------------------------------------------- 1 | ========================================= 2 | MongoDB\\Model\\IndexInfo::getNamespace() 3 | ========================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\IndexInfo::getNamespace() 17 | 18 | Return the index namespace, which is the namespace of the collection 19 | containing the index. 20 | 21 | .. code-block:: php 22 | 23 | function getNamespace(): string 24 | 25 | Return Values 26 | ------------- 27 | 28 | The index namespace. 29 | 30 | Examples 31 | -------- 32 | 33 | .. code-block:: php 34 | 35 | 'foo.bar', 39 | ]); 40 | 41 | echo $info->getNamespace(); 42 | 43 | The output would then resemble:: 44 | 45 | foo.bar 46 | 47 | See Also 48 | -------- 49 | 50 | - :phpmethod:`MongoDB\\Collection::createIndex()` 51 | - :phpmethod:`MongoDB\\Collection::getNamespace()` 52 | - :manual:`listIndexes ` command reference in 53 | the MongoDB manual 54 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBModelIndexInfo-getVersion.txt: -------------------------------------------------------------------------------- 1 | ======================================= 2 | MongoDB\\Model\\IndexInfo::getVersion() 3 | ======================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\Model\\IndexInfo::getVersion() 17 | 18 | Return the index version. 19 | 20 | .. code-block:: php 21 | 22 | function getVersion(): integer 23 | 24 | Return Values 25 | ------------- 26 | 27 | The index version. 28 | 29 | Examples 30 | -------- 31 | 32 | .. code-block:: php 33 | 34 | 1, 38 | ]); 39 | 40 | var_dump($info->getVersion()); 41 | 42 | The output would then resemble:: 43 | 44 | int(1) 45 | 46 | See Also 47 | -------- 48 | 49 | - :phpmethod:`MongoDB\\Collection::createIndex()` 50 | - :manual:`listIndexes ` command reference in 51 | the MongoDB manual 52 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBUpdateResult-getUpsertedCount.txt: -------------------------------------------------------------------------------- 1 | ========================================= 2 | MongoDB\\UpdateResult::getUpsertedCount() 3 | ========================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\UpdateResult::getUpsertedCount() 17 | 18 | Return the number of documents that were upserted. 19 | 20 | .. code-block:: php 21 | 22 | function getUpsertedCount(): integer 23 | 24 | This method should only be called if the write was acknowledged. 25 | 26 | Return Values 27 | ------------- 28 | 29 | The total number of documents that were upserted. This should be either ``0`` or 30 | ``1`` for an acknowledged update or replace operation, depending on whether an 31 | upsert occurred. 32 | 33 | Errors/Exceptions 34 | ----------------- 35 | 36 | .. include:: /includes/extracts/error-badmethodcallexception-write-result.rst 37 | 38 | See Also 39 | -------- 40 | 41 | - :php:`MongoDB\\Driver\\WriteResult::getUpsertedCount() 42 | ` 43 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/reference/method/MongoDBUpdateResult-isAcknowledged.txt: -------------------------------------------------------------------------------- 1 | ======================================= 2 | MongoDB\\UpdateResult::isAcknowledged() 3 | ======================================= 4 | 5 | .. default-domain:: mongodb 6 | 7 | .. contents:: On this page 8 | :local: 9 | :backlinks: none 10 | :depth: 1 11 | :class: singlecol 12 | 13 | Definition 14 | ---------- 15 | 16 | .. phpmethod:: MongoDB\\UpdateResult::isAcknowledged() 17 | 18 | Return whether the write was acknowledged. 19 | 20 | .. code-block:: php 21 | 22 | function isAcknowledged(): boolean 23 | 24 | Return Values 25 | ------------- 26 | 27 | A boolean indicating whether the write was acknowledged. 28 | 29 | See Also 30 | -------- 31 | 32 | - :php:`MongoDB\\Driver\\WriteResult::isAcknowledged() 33 | ` 34 | - :manual:`Write Concern ` in the MongoDB manual 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/docs/tutorial.txt: -------------------------------------------------------------------------------- 1 | Tutorials 2 | ========= 3 | 4 | .. default-domain:: mongodb 5 | 6 | .. toctree:: 7 | 8 | /tutorial/crud 9 | /tutorial/collation 10 | /tutorial/commands 11 | /tutorial/custom-types 12 | /tutorial/decimal128 13 | /tutorial/client-side-encryption 14 | /tutorial/gridfs 15 | /tutorial/indexes 16 | /tutorial/tailable-cursor 17 | /tutorial/example-data 18 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/mongo-orchestration/replica_sets/replicaset-one-node.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "REPLICASET_SINGLE", 3 | "name": "mongod", 4 | "members": [ 5 | { 6 | "procParams": { 7 | "dbpath": "/tmp/REPLICASET/3020/", 8 | "ipv6": true, 9 | "logappend": true, 10 | "logpath": "/tmp/REPLICASET/3020/mongod.log", 11 | "journal": true, 12 | "port": 3020, 13 | "bind_ip_all": true 14 | }, 15 | "rsParams": { 16 | "tags": { 17 | "ordinal": "one", 18 | "dc": "pa" 19 | } 20 | }, 21 | "server_id": "RS-alone" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/mongo-orchestration/standalone/standalone-auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongod", 3 | "id" : "STANDALONE_AUTH", 4 | "auth_key": "secret", 5 | "login": "root", 6 | "password": "toor", 7 | "procParams": { 8 | "dbpath": "/tmp/standalone-auth/", 9 | "ipv6": true, 10 | "logappend": true, 11 | "logpath": "/tmp/standalone-auth/m.log", 12 | "journal": true, 13 | "port": 2200, 14 | "bind_ip_all": true, 15 | "setParameter": {"enableTestCommands": 1} 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/mongo-orchestration/standalone/standalone-old.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongod", 3 | "id" : "STANDALONE", 4 | "procParams": { 5 | "dbpath": "/tmp/standalone/", 6 | "ipv6": true, 7 | "logappend": true, 8 | "logpath": "/tmp/standalone/mongod.log", 9 | "journal": true, 10 | "nssize": 1, 11 | "port": 2700, 12 | "bind_ip": "::,0.0.0.0", 13 | "smallfiles": true, 14 | "setParameter": {"enableTestCommands": 1} 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/mongo-orchestration/standalone/standalone-ssl.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongod", 3 | "id" : "STANDALONE_SSL", 4 | "procParams": { 5 | "dbpath": "/tmp/standalone-ssl/", 6 | "ipv6": true, 7 | "logappend": true, 8 | "logpath": "/tmp/standalone-ssl/m.log", 9 | "journal": true, 10 | "port": 2100, 11 | "bind_ip_all": true, 12 | "setParameter": {"enableTestCommands": 1} 13 | }, 14 | "sslParams": { 15 | "sslMode": "requireSSL", 16 | "sslCAFile": "$TRAVIS_BUILD_DIR/mongo-orchestration/ssl/ca.pem", 17 | "sslPEMKeyFile": "$TRAVIS_BUILD_DIR/mongo-orchestration/ssl/server.pem", 18 | "sslWeakCertificateValidation": true, 19 | "sslAllowInvalidHostnames": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/mongo-orchestration/standalone/standalone.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongod", 3 | "id" : "STANDALONE", 4 | "procParams": { 5 | "dbpath": "/tmp/standalone/", 6 | "ipv6": true, 7 | "logappend": true, 8 | "logpath": "/tmp/standalone/mongod.log", 9 | "journal": true, 10 | "port": 2000, 11 | "bind_ip_all": true, 12 | "setParameter": {"enableTestCommands": 1} 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ./tests/ 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/src/Exception/Exception.php: -------------------------------------------------------------------------------- 1 | collection = new Collection($this->manager, $this->getDatabaseName(), $this->getCollectionName()); 24 | 25 | $this->dropCollection(); 26 | } 27 | 28 | private function doTearDown() 29 | { 30 | if ($this->hasFailed()) { 31 | return; 32 | } 33 | 34 | $this->dropCollection(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/aggregate-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": "ping" 6 | } 7 | ], 8 | "minServerVersion": "3.4", 9 | "tests": [ 10 | { 11 | "description": "Aggregate with collation", 12 | "operation": { 13 | "name": "aggregate", 14 | "arguments": { 15 | "pipeline": [ 16 | { 17 | "$match": { 18 | "x": "PING" 19 | } 20 | } 21 | ], 22 | "collation": { 23 | "locale": "en_US", 24 | "strength": 2 25 | } 26 | } 27 | }, 28 | "outcome": { 29 | "result": [ 30 | { 31 | "_id": 1, 32 | "x": "ping" 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/aggregate.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": 22 10 | }, 11 | { 12 | "_id": 3, 13 | "x": 33 14 | } 15 | ], 16 | "tests": [ 17 | { 18 | "description": "Aggregate with multiple stages", 19 | "operation": { 20 | "name": "aggregate", 21 | "arguments": { 22 | "pipeline": [ 23 | { 24 | "$sort": { 25 | "x": 1 26 | } 27 | }, 28 | { 29 | "$match": { 30 | "_id": { 31 | "$gt": 1 32 | } 33 | } 34 | } 35 | ], 36 | "batchSize": 2 37 | } 38 | }, 39 | "outcome": { 40 | "result": [ 41 | { 42 | "_id": 2, 43 | "x": 22 44 | }, 45 | { 46 | "_id": 3, 47 | "x": 33 48 | } 49 | ] 50 | } 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/count-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": "PING" 6 | } 7 | ], 8 | "minServerVersion": "3.4", 9 | "tests": [ 10 | { 11 | "description": "Count documents with collation", 12 | "operation": { 13 | "name": "countDocuments", 14 | "arguments": { 15 | "filter": { 16 | "x": "ping" 17 | }, 18 | "collation": { 19 | "locale": "en_US", 20 | "strength": 2 21 | } 22 | } 23 | }, 24 | "outcome": { 25 | "result": 1 26 | } 27 | }, 28 | { 29 | "description": "Deprecated count with collation", 30 | "operation": { 31 | "name": "count", 32 | "arguments": { 33 | "filter": { 34 | "x": "ping" 35 | }, 36 | "collation": { 37 | "locale": "en_US", 38 | "strength": 2 39 | } 40 | } 41 | }, 42 | "outcome": { 43 | "result": 1 44 | } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/count-empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [], 3 | "tests": [ 4 | { 5 | "description": "Estimated document count with empty collection", 6 | "operation": { 7 | "name": "estimatedDocumentCount", 8 | "arguments": {} 9 | }, 10 | "outcome": { 11 | "result": 0 12 | } 13 | }, 14 | { 15 | "description": "Count documents with empty collection", 16 | "operation": { 17 | "name": "countDocuments", 18 | "arguments": { 19 | "filter": {} 20 | } 21 | }, 22 | "outcome": { 23 | "result": 0 24 | } 25 | }, 26 | { 27 | "description": "Deprecated count with empty collection", 28 | "operation": { 29 | "name": "count", 30 | "arguments": { 31 | "filter": {} 32 | } 33 | }, 34 | "outcome": { 35 | "result": 0 36 | } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/distinct-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "string": "PING" 6 | }, 7 | { 8 | "_id": 2, 9 | "string": "ping" 10 | } 11 | ], 12 | "minServerVersion": "3.4", 13 | "tests": [ 14 | { 15 | "description": "Distinct with a collation", 16 | "operation": { 17 | "name": "distinct", 18 | "arguments": { 19 | "fieldName": "string", 20 | "collation": { 21 | "locale": "en_US", 22 | "strength": 2 23 | } 24 | } 25 | }, 26 | "outcome": { 27 | "result": [ 28 | "PING" 29 | ] 30 | } 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/distinct.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": 22 10 | }, 11 | { 12 | "_id": 3, 13 | "x": 33 14 | } 15 | ], 16 | "tests": [ 17 | { 18 | "description": "Distinct without a filter", 19 | "operation": { 20 | "name": "distinct", 21 | "arguments": { 22 | "fieldName": "x", 23 | "filter": {} 24 | } 25 | }, 26 | "outcome": { 27 | "result": [ 28 | 11, 29 | 22, 30 | 33 31 | ] 32 | } 33 | }, 34 | { 35 | "description": "Distinct with a filter", 36 | "operation": { 37 | "name": "distinct", 38 | "arguments": { 39 | "fieldName": "x", 40 | "filter": { 41 | "_id": { 42 | "$gt": 1 43 | } 44 | } 45 | } 46 | }, 47 | "outcome": { 48 | "result": [ 49 | 22, 50 | 33 51 | ] 52 | } 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/read/find-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": "ping" 6 | } 7 | ], 8 | "minServerVersion": "3.4", 9 | "tests": [ 10 | { 11 | "description": "Find with a collation", 12 | "operation": { 13 | "name": "find", 14 | "arguments": { 15 | "filter": { 16 | "x": "PING" 17 | }, 18 | "collation": { 19 | "locale": "en_US", 20 | "strength": 2 21 | } 22 | } 23 | }, 24 | "outcome": { 25 | "result": [ 26 | { 27 | "_id": 1, 28 | "x": "ping" 29 | } 30 | ] 31 | } 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/write/deleteMany-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": "ping" 10 | }, 11 | { 12 | "_id": 3, 13 | "x": "pINg" 14 | } 15 | ], 16 | "minServerVersion": "3.4", 17 | "tests": [ 18 | { 19 | "description": "DeleteMany when many documents match with collation", 20 | "operation": { 21 | "name": "deleteMany", 22 | "arguments": { 23 | "filter": { 24 | "x": "PING" 25 | }, 26 | "collation": { 27 | "locale": "en_US", 28 | "strength": 2 29 | } 30 | } 31 | }, 32 | "outcome": { 33 | "result": { 34 | "deletedCount": 2 35 | }, 36 | "collection": { 37 | "data": [ 38 | { 39 | "_id": 1, 40 | "x": 11 41 | } 42 | ] 43 | } 44 | } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/write/deleteOne-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": "ping" 10 | }, 11 | { 12 | "_id": 3, 13 | "x": "pINg" 14 | } 15 | ], 16 | "minServerVersion": "3.4", 17 | "tests": [ 18 | { 19 | "description": "DeleteOne when many documents matches with collation", 20 | "operation": { 21 | "name": "deleteOne", 22 | "arguments": { 23 | "filter": { 24 | "x": "PING" 25 | }, 26 | "collation": { 27 | "locale": "en_US", 28 | "strength": 2 29 | } 30 | } 31 | }, 32 | "outcome": { 33 | "result": { 34 | "deletedCount": 1 35 | }, 36 | "collection": { 37 | "data": [ 38 | { 39 | "_id": 1, 40 | "x": 11 41 | }, 42 | { 43 | "_id": 3, 44 | "x": "pINg" 45 | } 46 | ] 47 | } 48 | } 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/write/insertOne.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | } 7 | ], 8 | "tests": [ 9 | { 10 | "description": "InsertOne with a non-existing document", 11 | "operation": { 12 | "name": "insertOne", 13 | "arguments": { 14 | "document": { 15 | "_id": 2, 16 | "x": 22 17 | } 18 | } 19 | }, 20 | "outcome": { 21 | "result": { 22 | "insertedId": 2 23 | }, 24 | "collection": { 25 | "data": [ 26 | { 27 | "_id": 1, 28 | "x": 11 29 | }, 30 | { 31 | "_id": 2, 32 | "x": 22 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/write/replaceOne-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": "ping" 10 | } 11 | ], 12 | "minServerVersion": "3.4", 13 | "tests": [ 14 | { 15 | "description": "ReplaceOne when one document matches with collation", 16 | "operation": { 17 | "name": "replaceOne", 18 | "arguments": { 19 | "filter": { 20 | "x": "PING" 21 | }, 22 | "replacement": { 23 | "_id": 2, 24 | "x": "pong" 25 | }, 26 | "collation": { 27 | "locale": "en_US", 28 | "strength": 2 29 | } 30 | } 31 | }, 32 | "outcome": { 33 | "result": { 34 | "matchedCount": 1, 35 | "modifiedCount": 1, 36 | "upsertedCount": 0 37 | }, 38 | "collection": { 39 | "data": [ 40 | { 41 | "_id": 1, 42 | "x": 11 43 | }, 44 | { 45 | "_id": 2, 46 | "x": "pong" 47 | } 48 | ] 49 | } 50 | } 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Collection/spec-tests/write/updateOne-collation.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "_id": 1, 5 | "x": 11 6 | }, 7 | { 8 | "_id": 2, 9 | "x": "ping" 10 | } 11 | ], 12 | "minServerVersion": "3.4", 13 | "tests": [ 14 | { 15 | "description": "UpdateOne when one document matches with collation", 16 | "operation": { 17 | "name": "updateOne", 18 | "arguments": { 19 | "filter": { 20 | "x": "PING" 21 | }, 22 | "update": { 23 | "$set": { 24 | "x": "pong" 25 | } 26 | }, 27 | "collation": { 28 | "locale": "en_US", 29 | "strength": 2 30 | } 31 | } 32 | }, 33 | "outcome": { 34 | "result": { 35 | "matchedCount": 1, 36 | "modifiedCount": 1, 37 | "upsertedCount": 0 38 | }, 39 | "collection": { 40 | "data": [ 41 | { 42 | "_id": 1, 43 | "x": 11 44 | }, 45 | { 46 | "_id": 2, 47 | "x": "pong" 48 | } 49 | ] 50 | } 51 | } 52 | } 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Compat/PolyfillAssertTrait.php: -------------------------------------------------------------------------------- 1 | hasMethod('assertEqualsWithDelta')) { 11 | /** 12 | * @internal 13 | */ 14 | trait PolyfillAssertTrait 15 | { 16 | use SymfonyPolyfillAssertTrait; 17 | } 18 | } else { 19 | /** 20 | * @internal 21 | */ 22 | trait PolyfillAssertTrait 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Database/FunctionalTestCase.php: -------------------------------------------------------------------------------- 1 | database = new Database($this->manager, $this->getDatabaseName()); 24 | $this->database->drop(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Model/UncloneableObject.php: -------------------------------------------------------------------------------- 1 | getDatabaseName(), $this->getCollectionName(), []); 13 | $this->assertSame(0, $operation->execute($this->getPrimaryServer())); 14 | } 15 | 16 | public function testNonEmptyCollection() 17 | { 18 | $insertMany = new InsertMany($this->getDatabaseName(), $this->getCollectionName(), [ 19 | ['x' => 1], 20 | ['x' => 2], 21 | ['y' => 3], 22 | ['z' => 4], 23 | ]); 24 | $insertMany->execute($this->getPrimaryServer()); 25 | 26 | $operation = new CountDocuments($this->getDatabaseName(), $this->getCollectionName(), []); 27 | $this->assertSame(4, $operation->execute($this->getPrimaryServer())); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/DatabaseCommandFunctionalTest.php: -------------------------------------------------------------------------------- 1 | getServerVersion(), '3.6.0', '<')) { 14 | $this->markTestSkipped('Sessions are not supported'); 15 | } 16 | 17 | (new CommandObserver())->observe( 18 | function () { 19 | $operation = new DatabaseCommand( 20 | $this->getDatabaseName(), 21 | ['ping' => 1], 22 | ['session' => $this->createSession()] 23 | ); 24 | 25 | $operation->execute($this->getPrimaryServer()); 26 | }, 27 | function (array $event) { 28 | $this->assertObjectHasAttribute('lsid', $event['started']->getCommand()); 29 | } 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/DropCollectionTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new DropCollection($this->getDatabaseName(), $this->getCollectionName(), $options); 17 | } 18 | 19 | public function provideInvalidConstructorOptions() 20 | { 21 | $options = []; 22 | 23 | foreach ($this->getInvalidSessionValues() as $value) { 24 | $options[][] = ['session' => $value]; 25 | } 26 | 27 | foreach ($this->getInvalidArrayValues() as $value) { 28 | $options[][] = ['typeMap' => $value]; 29 | } 30 | 31 | foreach ($this->getInvalidWriteConcernValues() as $value) { 32 | $options[][] = ['writeConcern' => $value]; 33 | } 34 | 35 | return $options; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/DropDatabaseTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new DropDatabase($this->getDatabaseName(), $options); 17 | } 18 | 19 | public function provideInvalidConstructorOptions() 20 | { 21 | $options = []; 22 | 23 | foreach ($this->getInvalidSessionValues() as $value) { 24 | $options[][] = ['session' => $value]; 25 | } 26 | 27 | foreach ($this->getInvalidArrayValues() as $value) { 28 | $options[][] = ['typeMap' => $value]; 29 | } 30 | 31 | foreach ($this->getInvalidWriteConcernValues() as $value) { 32 | $options[][] = ['writeConcern' => $value]; 33 | } 34 | 35 | return $options; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/FindOneAndDeleteTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new FindOneAndDelete($this->getDatabaseName(), $this->getCollectionName(), $filter); 17 | } 18 | 19 | /** 20 | * @dataProvider provideInvalidConstructorOptions 21 | */ 22 | public function testConstructorOptionTypeChecks(array $options) 23 | { 24 | $this->expectException(InvalidArgumentException::class); 25 | new FindOneAndDelete($this->getDatabaseName(), $this->getCollectionName(), [], $options); 26 | } 27 | 28 | public function provideInvalidConstructorOptions() 29 | { 30 | $options = []; 31 | 32 | foreach ($this->getInvalidDocumentValues() as $value) { 33 | $options[][] = ['projection' => $value]; 34 | } 35 | 36 | return $options; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/FunctionalTestCase.php: -------------------------------------------------------------------------------- 1 | dropCollection(); 22 | } 23 | 24 | private function doTearDown() 25 | { 26 | if ($this->hasFailed()) { 27 | return; 28 | } 29 | 30 | $this->dropCollection(); 31 | } 32 | 33 | protected function createDefaultReadConcern() 34 | { 35 | return new ReadConcern(); 36 | } 37 | 38 | protected function createDefaultWriteConcern() 39 | { 40 | return new WriteConcern(-2); 41 | } 42 | 43 | protected function createSession() 44 | { 45 | return $this->manager->startSession(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/ListCollectionsTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new ListCollections($this->getDatabaseName(), $options); 17 | } 18 | 19 | public function provideInvalidConstructorOptions() 20 | { 21 | $options = []; 22 | 23 | foreach ($this->getInvalidDocumentValues() as $value) { 24 | $options[][] = ['filter' => $value]; 25 | } 26 | 27 | foreach ($this->getInvalidIntegerValues() as $value) { 28 | $options[][] = ['maxTimeMS' => $value]; 29 | } 30 | 31 | foreach ($this->getInvalidSessionValues() as $value) { 32 | $options[][] = ['session' => $value]; 33 | } 34 | 35 | return $options; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/ListDatabasesTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new ListDatabases($options); 17 | } 18 | 19 | public function provideInvalidConstructorOptions() 20 | { 21 | $options = []; 22 | 23 | foreach ($this->getInvalidDocumentValues() as $value) { 24 | $options[][] = ['filter' => $value]; 25 | } 26 | 27 | foreach ($this->getInvalidIntegerValues() as $value) { 28 | $options[][] = ['maxTimeMS' => $value]; 29 | } 30 | 31 | foreach ($this->getInvalidSessionValues() as $value) { 32 | $options[][] = ['session' => $value]; 33 | } 34 | 35 | return $options; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/ListIndexesTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 16 | new ListIndexes($this->getDatabaseName(), $this->getCollectionName(), $options); 17 | } 18 | 19 | public function provideInvalidConstructorOptions() 20 | { 21 | $options = []; 22 | 23 | foreach ($this->getInvalidIntegerValues() as $value) { 24 | $options[][] = ['maxTimeMS' => $value]; 25 | } 26 | 27 | foreach ($this->getInvalidSessionValues() as $value) { 28 | $options[][] = ['session' => $value]; 29 | } 30 | 31 | return $options; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lessons/5.3/vendor/mongodb/mongodb/tests/Operation/TestCase.php: -------------------------------------------------------------------------------- 1 |