使用MongoSH连接OracleDB
使用MongoSH 连接Oracle Database
Step 1. 用mongosh连接OracleDB
mongosh --tlsAllowInvalidCertificates 'mongodb://roger:password@127.0.0.1:27017/roger?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true'
show collections
Step 2. 增删查改
db.station.find({_id:'120'})
db.station.updateOne({_id:'120'}, {$set:{capacity:27}});
db.station.find({_id:'120'});
db.station.remove({_id:'120'});
db.station.find({_id:'120'});
db.station.insert({
_id: '120',
station_type: 'classic',
electric_bike_surcharge_waiver: false,
eightd_has_key_dispenser: false,
has_kiosk: true,
rental_methods: [ 'KEY', 'CREDITCARD' ],
lat: 40.68676793,
eightd_station_services: [],
lon: -73.95928168,
legacy_id: '120',
region_id: '71',
capacity: 24,
name: 'Lexington Ave & Classon Ave',
external_id: '66db29e6-0aca-11e7-82f6-3863bb44ef7c',
short_name: '4452.03',
rental_uris: {
ios: 'https://bkn.lft.to/lastmile_qr_scan',
android: 'https://bkn.lft.to/lastmile_qr_scan'
}
}
);