Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
This function is a helper to rename an existing collection on a MongoDB server.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MongoDB | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
MongoDBRef | The reference number for the mongo connection. | $MongoDB | |
NewDatabase | The new name for the database. | ||
NewCollectionName | The new name of the collection. | ||
DropTargetBeforeRename | If an existing collection matches the new name, drop it before the rename. Pass 1 to drop or 0 to not drop and return an error in case of a name collision. Default is 0. |
0 | Optional |
Returns OK or error.
This function checks for a license.
Created 27th July 2022, last changed 27th July 2022