mongodb数据库update
// db.layers.find({path:/e:\\upload/})
// .projection({})
// .sort({_id:-1})
// .limit(100)
/*db.layers.update({path:/e:\\upload/}, {"$set": { "path": }})*/
/*db.layers.find({path:/E:\\upload/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("E:\\upload\\","/data/thrc_zhf/release/156tuisong/upload/upload/").replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.layers.find({path:/thrc_/})*/
/*db.layers.find({path:/e:\\data/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("e:\\data\\","/data/thrc_zhf/release/156tuisong/data/data/").replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.folders.find({path:/E:\\upload/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("E:\\upload\\","/data/thrc_zhf/release/156tuisong/upload/upload/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.folders.find({path:/e:\\data/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("e:\\data\\","/data/thrc_zhf/release/156tuisong/data/data/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/* db.folders.find({path:/thrc_zhf/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace(/\\/g,"/");
print(newPath);
//db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.layers.find({path:/thrc_zhf/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
db.scenes.find({scene:/39.104.181.156:8099/}).forEach(function(row){
//print(row._id + row.scene);
print('=======================================================');
let newPath = row.scene.replace(/39.104.181.156:8099/g,"103.31.53.234:9001");
print(newPath);
db.scenes.update({_id:row._id},{"$set": { "scene": newPath}});
})
http://103.31.53.234:8083/cesium148/timg.jpg
http://103.31.53.234:8083/cesium148/a.jpg
========================================================
/*db.folders.find({path:/E:\\data/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("E:\\data\\","/data/thrc_zhf/release/156tuisong/data/data/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})
*/
/*db.folders.find({path:/e:\\upload/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("e:\\upload\\","/data/thrc_zhf/release/156tuisong/upload/upload/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
db.folders.find({path:/thrc_zhf/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace(/\\/g,"/");
print(newPath);
//db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})