Reputation: 153
It's database drop in mongo shell, but not in Datagrip.
I want to know why. Help me.
> use test
switched to db test
> db.Hi.insert({title:"temp"});
WriteResult({ "nInserted" : 1 })
> show dbs;
admin 0.000GB
config 0.000GB
local 0.000GB
test 0.000GB
> db.dropDatabase();
{ "dropped" : "test", "ok" : 1 }
> show dbs;
admin 0.000GB
config 0.000GB
local 0.000GB
use test;
db.Hi.insert({title:"temp"});
show dbs;
db.dropDatabase(); // Error
show dbs;
java.lang.Exception: TypeError: invokeMember (dropDatabase) on JavaObject[com.mongodb.mongosh.service.JavaServiceProvider@60231c39 (com.mongodb.mongosh.service.JavaServiceProvider)] failed due to: Arity error - expected: 3 actual: 2
TypeError: invokeMember (dropDatabase) on JavaObject[com.mongodb.mongosh.service.JavaServiceProvider@60231c39 (com.mongodb.mongosh.service.JavaServiceProvider)] failed due to: Arity error - expected: 3 actual: 2
at Proxy.<anonymous> (all-standalone.js:77453:67)
at step (all-standalone.js:77314:23)
at Object.<anonymous> (all-standalone.js:77295: ...
Upvotes: 2
Views: 1946
Reputation: 1464
It looks like you need to update your MongoDB JDBC Driver to the latest version 1.11
.
With the latest driver version your queries are working correctly:
Upvotes: 0