r.dbDrop(dbName) → object
Drop a database. The database, all its tables, and corresponding data will be deleted.
If successful, the command returns an object with two fields:
dbs_dropped
: always 1
.tables_dropped
: the number of tables in the dropped database.config_changes
: a list containing one two-field object, old_val
and new_val
:
old_val
: the database’s original config value.new_val
: always null
.If the given database does not exist, the command throws ReqlRuntimeError
.
Example: Drop a database named ‘superheroes’.
r.dbDrop("superheroes").run(conn);
Return:
{
"config_changes": [
{
"old_val": {
"id": "e4689cfc-e903-4532-a0e6-2d6797a43f07",
"name": "superheroes"
},
"new_val": null
}
],
"tables_dropped": 3,
"dbs_dropped": 1
}
Couldn't find what you were looking for?
Contribute: edit this page or open an issue