From 7378e876d8fa75088fcf2a1eb343275cc567035c Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:23:19 +0000 Subject: [PATCH] =?UTF-8?q?update=20ArkDataKit/entry/src/main/ets/pages/Lo?= =?UTF-8?q?calDatabaseReader.ets.=20=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../entry/src/main/ets/pages/LocalDatabaseReader.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets b/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets index e353259..5a57dc6 100644 --- a/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets +++ b/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets @@ -23,14 +23,14 @@ import { relationalStore } from '@kit.ArkData'; import { common } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; -// 工具类中:在EntryAbility中获取Context后保存至AppStorage,然后在工具类中使用AppStorage获取 +// Obtaining the Context in EntryAbility, save it to AppStorage, then use AppStorage to retrieve it in the utility class. let context = AppStorage.get('context') as UIContext; let UiAbilityContent = context.getHostContext() as common.UIAbilityContext; let RDBDirectory = UiAbilityContent.databaseDir; let resource = UiAbilityContent.resourceManager; function initDatabase() { - // 创建数据库沙箱目录 + // Create a database sandbox directory try { let dirPath = RDBDirectory + '/entry'; fileIo.mkdirSync(dirPath); @@ -40,10 +40,10 @@ function initDatabase() { console.error(`mkdir rdbPath failed, error code: ${error.code}, message: ${error.message}.`); } - //数据库名称 + // Set db name let dbName: string = 'Objective.db'; - //读取rawfile目录下db文件 + // Read the db file in the rawfile directory try { let content = resource.getRawFileContentSync(dbName); let cFile = RDBDirectory + '/entry/rdb/' + dbName; -- Gitee