show dbs
use <db> # also creates
show collections
db.getCollectionNames()
db.showCollections()
db.domains.getIndexes()
db.domains.stats()
db.domains.count()
db.domains.find()
db.domains.find({name:'www.devdungeon.com'})
db.domains.count({lastchecked:{$exists:true}, skipped: null})
db.domains.find({headers: {$elemMatch: {value: {$regex: 'Cookie'}}}}).pretty()
db.domains.find({headers: {$elemMatch: {key: {$regex: 'Drupal'}}}}).pretty()
db.products.insert( { item: "card", qty: 15 } )
db.<collection>.drop() # DELETE
db.dropDatabase()
Created
June 3, 2020 20:42
-
-
Save NanoDano/68debba98394efa995be40b7bcaae2e6 to your computer and use it in GitHub Desktop.
MongoDB example commands and queries from WebGenome project
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment