Mongo
Last Edited Time
Feb 9, 2022 06:26 AM
date
Jan 3, 2018
slug
mongo
status
Published
tags
Mongo
NodeJS
Command
Notebook
summary
早期 Mongo 工作常用命令记录
type
Post
Mongo
mongo ip-172-31-34-160.us-west-2.compute.internal
show dbs;
show collections;
find
db.catalog_product_entity.find({_id:83903}).pretty()
db.catalog_category_entity.find({_id:11044}).pretty()
db.catalog_product_entity.find({_id:83903}, {'options.1.min':1}).pretty()
db.catalog_product_entity.find({'stock.stock_id':{$exists:true}}).pretty();
db.catalog_product_entity.find({_id:{$in: [406,407]}},{'name':1}).pretty();
db.catalog_product_entity.find({},{'name':1}).skip(10).limit(10).sort({_id:-1}).pretty();
db.core_website.find({$where:"this._id!=this.website_id"}).limit(1).pretty();
update
db.catalog_product_entity.update({_id:83903}, {$set:{'options.1.min':0}})