- 新建 MainPage.ets,用 GridRow 响应式布局组合星图+聊天 - Index.ets 改为 2 Tab(TrulyMEM + 设置) - GraphPage/ChatPage 接收 @Prop db 从父组件传入 - 恢复 README.md / README_EN.md 的特别鸣谢部分
22 lines
593 B
Plaintext
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;
|
|
}
|
|
}
|