From 90c2a394676eb3067b8403e9d79f7c1bcba23cf5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Fri, 5 Jun 2026 17:31:37 -0400 Subject: [PATCH] fix: implement ApiClient.resetStats to satisfy ClientApi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The @query-doctor/core bump added resetStats() to the ClientApi interface, breaking typecheck. Implement it as the inverse of updateStatistics — reverting the optimizer to default stats. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/remote/api-client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/remote/api-client.ts b/src/remote/api-client.ts index a52ea3e..66d8aa8 100644 --- a/src/remote/api-client.ts +++ b/src/remote/api-client.ts @@ -165,6 +165,10 @@ export class ApiClient extends RpcTarget implements ClientApi { await this.remote.applyStatistics(Statistics.statsModeFromExport(stats)); } + async resetStats(): Promise { + await this.remote.applyStatistics(Statistics.defaultStatsMode); + } + async hideIndex(indexName: string): Promise { this.remote.optimizer.toggleIndex(PgIdentifier.fromString(indexName)); }