From c78a13216476ca4a891c08bd2c28ff57a757fe7c Mon Sep 17 00:00:00 2001 From: Chareice Date: Thu, 25 Jan 2024 23:07:45 +0800 Subject: [PATCH] fix: list fields --- packages/core/database/src/collection.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/database/src/collection.ts b/packages/core/database/src/collection.ts index b335267452..54276a880a 100644 --- a/packages/core/database/src/collection.ts +++ b/packages/core/database/src/collection.ts @@ -270,6 +270,9 @@ export class Collection< return this.fields.get(name); } + getFields() { + return [...this.fields.values()]; + } addField(name: string, options: FieldOptions): Field { return this.setField(name, options); }