Files
TrulyMEM-TrueHumanMEM-local/harmonyos/trulymem-core/src/main/ets/GraphDatabase.ets
root 2a42183aaa feat: 合并星图和聊天页面为 MainPage,响应式 GridRow 布局
- 新建 MainPage.ets,用 GridRow 响应式布局组合星图+聊天
- Index.ets 改为 2 Tab(TrulyMEM + 设置)
- GraphPage/ChatPage 接收 @Prop db 从父组件传入
- 恢复 README.md / README_EN.md 的特别鸣谢部分
2026-04-28 13:53:06 +08:00

22 lines
593 B
Plaintext

import relationalStore from '@ohos.data.relationalStore';
import { Context } from '@ohos.abilityAccessCtrl';
const STORE_CONFIG: relationalStore.StoreConfig = {
name: 'trulymem.db',
securityLevel: relationalStore.SecurityLevel.S1
};
export class GraphDatabase {
private store?: relationalStore.RdbStore;
private context?: Context;
async init(context: Context) {
this.context = context;
this.store = await relationalStore.getRdbStore(context, STORE_CONFIG);
}
getStore(): relationalStore.RdbStore | undefined {
return this.store;
}
}