Yes, although you do it via the native MongoDB driver and not Mongoose itself. Assuming a required, connected, mongoose
variable, the native Db
object is accessible via mongoose.connection.db
, and that object provides dropCollection
and dropDatabase
methods.
// Drop the 'foo' collection from the current database mongoose.connection.db.dropCollection('foo', function(err, result) {...}); // Drop the current database mongoose.connection.db.dropDatabase(function(err, result) {...});
Related Posts:
- How can I convert MP3 file to a Base64 encoded string? [closed]
- What is a sanity test/check
- What is an instance variable in Java?
- Discord music bot not working
- Error in “MLSD” command While Connecting FTP to Server [closed]
- Java default constructor
- How do I make a delay in Java?
- did you specify the right host or port? error on Kubernetes
- How does Java’s PriorityQueue differ from a min-heap?
- What is a Memory Heap?
- 403 Forbidden vs 401 Unauthorized HTTP responses
- Advanced AREL or just Rails Query for has_many through search by association
- “If not” condition statement in python
- How can I sort a dictionary by key?
- What does ERR_SPDY_PROTOCOL_ERROR mean in nginx?
- What is a bitmask and a mask?
- C++ code file extension? What is the difference between .cc and .cpp
- How to remove origin from git repository
- Transport endpoint is not connected
- How to convert .crt to .pem [duplicate]
- pagebreak in markdown while creating pdf
- Time Complexity of Prims Algorithm?
- Ping – Request timed out
- How do I remove version tracking from a project cloned from git?
- How do I split a string on a delimiter in Bash?
- Why does Wi-Fi have so much more bandwidth than Bluetooth?
- What’s the difference between & and && in MATLAB?
- azure error 502 – Web server received an invalid response while acting as a gateway or proxy server
- What is a Ray ID (Cloudflare)?
- How do I get a list of built-in data sets in R?
- java.text.ParseException: Unparseable date
- Difference between .o and .ko file
- R error: all arguments must have the same length
- What is the definition of a “disparity map”?
- Alternative to ui-grid(doesn’t support angular2/4)
- Tool for drawing parse trees?
- Push items into mongo array via mongoose
- How do I install the OpenSSL libraries on Ubuntu?
- How can I specify a display?
- Clearing localStorage in javascript?
- Search all the occurrences of a string in the entire project in Android Studio
- “docker build” requires exactly 1 argument(s)
- declaring a priority_queue in c++ with a custom comparator
- SwiftUI – How do I change the background color of a View?
- How to resolve the error java.net.SocketException: Too many open files
- Using map in Haskell
- R dates “origin” must be supplied
- How to one hot encode several categorical variables in R
- cannot load such file — bundler/setup (LoadError)
- Downgrade npm to an older version
- Factory Pattern. When to use factory methods?
- How to send a PUT/DELETE request in jQuery?
- Arithmetic Overflow in mips
- How to change angular port from 4200 to any other
- Render HTML string as real HTML in a React component
- How to draw lines in Java
- Styling Select Drop down box
- Google Gmail – “The conversation that you requested could not be loaded”
- apt-get for Cygwin?
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- What is “pass-by-name” and how does it work exactly?
- is it possible to get the MAC address for machine using nmap
- Import error No module named skimage
- Why define PI = 4*ATAN(1.d0)
- Java: Not a statement
- Passing a hexadecimal value into a module in Verilog
- mport win32ui in python 3.6
- How to print a int64_t type in C
- How to store data in the flash memory of a Arduino Uno (ATmega328p)
- What is a blob URL and why it is used?
- Call to undefined function `get_plugin_data()`
- Contact Form 7 – Execute code AFTER mail send [closed]
- How to apply a patch?
- How can I trash multiple posts at once from the front end?
- Multiple og:image for Facebook
- How to get a current post’s blog id
- Rendering javascript in render_callback php Code
- Will has_category be true is used on index and one of queried posts has the category?
- How to get a value from wp_dropdown_user?
- Customized Essay Writing Service
- Exclude categories with only sticky posts OR count sticky post of specific category
- In systemd, what’s the difference between After= and Requires=?
- Windows Server restart / shutdown history
- How do I set the global PATH environment variable on OS X?
- nmap find all alive hostnames and IPs in LAN
- Should CNAME Be Used For Subdomains?
- How do I create user accounts from the Terminal in Mac OS X 10.5?
- How to get a .pem file from ssh key pair?
- How to inspect remote SMTP server’s TLS certificate?
- Choosing between meaningful and meaningless hostnames [closed]
- logrotating files in a directories and its subdirectories
- Multiple TXT fields for same subdomain
- How to restart Nginx on Mac OS X?
- Do SPF Records For Primary Domain apply to subdomains?
- Why is the response on localhost so slow?
- apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName