FireDAC.Phys.MongoDBWrapper.TMongoCollection.Rename
Delphi
procedure Rename(const ANewDB, ANewName: String; ADropTarget: Boolean = True);
C++
void __fastcall Rename(const System::UnicodeString ANewDB, const System::UnicodeString ANewName, bool ADropTarget = true);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Phys.MongoDBWrapper.pas FireDAC.Phys.MongoDBWrapper.hpp |
FireDAC.Phys.MongoDBWrapper | TMongoCollection |
Description
Changes the name of the collection and the database that contains the collection to the specified values.
If an existing collection matches the specified new name:
- If
ADropTarget
isTrue
, Rename drops the existing collection and then renames this collection to replace the dropped collection. - If
ADropTarget
isFalse
, Rename raises an exception.