@h-ai/reldb 0.1.0-alpha.43 → 0.1.0-alpha.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -80,8 +80,8 @@ await reldb.init({
|
|
|
80
80
|
|
|
81
81
|
```yaml
|
|
82
82
|
# config/_db.yml
|
|
83
|
-
type:
|
|
84
|
-
database:
|
|
83
|
+
type: sqlite
|
|
84
|
+
database: ./data/app.db
|
|
85
85
|
operationLog:
|
|
86
86
|
read: false # query / get / queryPage
|
|
87
87
|
write: false # DDL, execute / batch, tx.begin / tx.commit / tx.rollback
|
|
@@ -89,6 +89,9 @@ operationLog:
|
|
|
89
89
|
level: debug # info | debug | trace,默认 debug
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
通过 `core.config.load('db', ...)` 加载时,`HAI_DB_TYPE`、
|
|
93
|
+
`HAI_DB_DATABASE`、`HAI_DB_OPERATIONLOG_LEVEL` 等约定变量优先于 YAML。
|
|
94
|
+
|
|
92
95
|
```ts
|
|
93
96
|
await reldb.init({
|
|
94
97
|
type: 'sqlite',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-ai/reldb",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.45",
|
|
5
5
|
"description": "Hai Framework relational database module for SQLite, PostgreSQL, and MySQL.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"better-sqlite3": "^12.6.2",
|
|
24
24
|
"zod": "^4.4.3",
|
|
25
|
-
"@h-ai/core": "0.1.0-alpha.
|
|
25
|
+
"@h-ai/core": "0.1.0-alpha.45"
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
28
|
"mysql2": "^3.11.5",
|