From 62d17e924e075f7a337d88d8c91bbd6f8d6c6e69 Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Thu, 28 Nov 2024 15:04:19 +0100 Subject: [PATCH] More renaming --- CHANGELOG.md | 7 +++++++ src/collections.ts | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08dc44613..76f33ea0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,13 @@ This driver uses semantic versioning: - A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_ changes that require changes in your code to upgrade. +## [Unreleased] + +### Changed + +- Renamed `CollectionDropOptions` type to `DropCollectionOptions` +- Renamed `CollectionTruncateOptions` type to `TruncateCollectionOptions` + ## [10.0.0-alpha.0] - 2024-11-28 This is a major release and breaks backwards compatibility. diff --git a/src/collections.ts b/src/collections.ts index 942c064ee..557bdcaaf 100644 --- a/src/collections.ts +++ b/src/collections.ts @@ -339,7 +339,7 @@ export type CollectionChecksumOptions = { /** * Options for truncating collections. */ -export type CollectionTruncateOptions = { +export type TruncateCollectionOptions = { /** * Whether the collection should be compacted after truncation. */ @@ -354,7 +354,7 @@ export type CollectionTruncateOptions = { /** * Options for dropping collections. */ -export type CollectionDropOptions = { +export type DropCollectionOptions = { /** * Whether the collection is a system collection. If the collection is a * system collection, this option must be set to `true` or ArangoDB will @@ -819,7 +819,7 @@ export interface DocumentCollection< * // the collection "some-collection" is now empty * ``` */ - truncate(options?: CollectionTruncateOptions): Promise>; + truncate(options?: TruncateCollectionOptions): Promise>; /** * Deletes the collection from the database. * @@ -834,7 +834,7 @@ export interface DocumentCollection< * ``` */ drop( - options?: CollectionDropOptions + options?: DropCollectionOptions ): Promise>; /** * Triggers compaction for a collection. @@ -2415,7 +2415,7 @@ export class Collection< return result; } - truncate(options?: CollectionTruncateOptions): Promise> { + truncate(options?: TruncateCollectionOptions): Promise> { return this._db.request({ method: "PUT", path: `/_api/collection/${this._name}/truncate`, @@ -2423,7 +2423,7 @@ export class Collection< }); } - drop(options?: CollectionDropOptions) { + drop(options?: DropCollectionOptions) { return this._db.request({ method: "DELETE", path: `/_api/collection/${encodeURIComponent(this._name)}`,