ReQL command: dbDrop
Command syntax
r.dbDrop(dbName) → object
Description
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: always1.tables_dropped: the number of tables in the dropped database.config_changes: a list containing one two-field object,old_valandnew_val:old_val: the database’s original config value.new_val: alwaysnull.
If the given database does not exist, the command throws ReqlRuntimeError.
Example: Drop a database named ‘superheroes’.
> r.dbDrop('superheroes').run(conn, callback);
// Result passed to callback
{
"config_changes": [
{
"old_val": {
"id": "e4689cfc-e903-4532-a0e6-2d6797a43f07",
"name": "superheroes"
},
"new_val": null
}
],
"tables_dropped": 3,
"dbs_dropped": 1
}
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
Contribute: edit this page or open an issue
