From 0081229f86c4590305cc2d993be32a8f2deada95 Mon Sep 17 00:00:00 2001 From: monoid Date: Fri, 18 Feb 2022 23:08:51 +0900 Subject: [PATCH] feat: set interface --- src/db/doc.ts | 3 +++ src/model/doc.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/db/doc.ts b/src/db/doc.ts index 85af977..1dc6699 100644 --- a/src/db/doc.ts +++ b/src/db/doc.ts @@ -15,6 +15,9 @@ class KnexDocumentAccessor implements DocumentAccessor{ this.knex = knex; this.tagController = createKnexTagController(knex); } + async search(search_word: string): Promise{ + throw new Error("Not implemented"); + } async addList(content_list: DocumentBody[]):Promise{ return await this.knex.transaction(async (trx)=>{ //add tags diff --git a/src/model/doc.ts b/src/model/doc.ts index d57976c..4b34fe3 100644 --- a/src/model/doc.ts +++ b/src/model/doc.ts @@ -94,6 +94,10 @@ export interface DocumentAccessor{ * find deleted content */ findDeleted:(content_type:string)=>Promise; + /** + * search by in document + */ + search:(search_word:string)=>Promise /** * update document except tag. */