(_connection: Connection, _session?: ClientSession)
| 40 | } |
| 41 | |
| 42 | override buildCommandDocument(_connection: Connection, _session?: ClientSession): Document { |
| 43 | const renameCollection = this.collection.namespace; |
| 44 | const to = this.collection.s.namespace.withCollection(this.newName).toString(); |
| 45 | const dropTarget = |
| 46 | typeof this.options.dropTarget === 'boolean' ? this.options.dropTarget : false; |
| 47 | |
| 48 | return { |
| 49 | renameCollection, |
| 50 | to, |
| 51 | dropTarget |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | override handleOk(_response: InstanceType<typeof this.SERVER_COMMAND_RESPONSE_TYPE>): Document { |
| 56 | return new Collection(this.collection.db, this.newName, this.collection.s.options); |
nothing calls this directly
no test coverage detected