litedbmodel 2.2.3 → 2.2.4
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/dist/index.cjs +6 -41
- package/dist/scp/index.cjs +7 -42
- package/dist/scp/index.d.ts +1 -1
- package/dist/scp/index.d.ts.map +1 -1
- package/dist/scp/index.js.map +1 -1
- package/dist/scp/index.mjs +7 -42
- package/dist/scp/makesql/index.d.ts +1 -1
- package/dist/scp/makesql/index.d.ts.map +1 -1
- package/dist/scp/makesql/index.js.map +1 -1
- package/dist/scp/makesql/tx.d.ts +20 -24
- package/dist/scp/makesql/tx.d.ts.map +1 -1
- package/dist/scp/makesql/tx.js +24 -53
- package/dist/scp/makesql/tx.js.map +1 -1
- package/dist/scp/makesql/writeouttype.d.ts +5 -7
- package/dist/scp/makesql/writeouttype.d.ts.map +1 -1
- package/dist/scp/makesql/writeouttype.js +13 -19
- package/dist/scp/makesql/writeouttype.js.map +1 -1
- package/dist/scp/write-bundle.js +1 -1
- package/dist/scp/write-bundle.js.map +1 -1
- package/docs/BENCHMARK.md +26 -22
- package/docs/COMPARISON.md +8 -4
- package/docs/api/README.md +1 -1
- package/docs/api/classes/Conditions.md +10 -10
- package/docs/api/classes/DBHandler.md +17 -17
- package/docs/api/classes/DBModel.md +111 -104
- package/docs/api/classes/LimitExceededError.md +8 -8
- package/docs/api/classes/Middleware.md +18 -18
- package/docs/api/classes/SqlRaw.md +6 -6
- package/docs/api/classes/SqlRef.md +7 -7
- package/docs/api/classes/Values.md +6 -6
- package/docs/api/classes/WriteInReadOnlyContextError.md +5 -5
- package/docs/api/classes/WriteOutsideTransactionError.md +5 -5
- package/docs/api/functions/belongsTo.md +2 -2
- package/docs/api/functions/closeAllPools.md +2 -2
- package/docs/api/functions/condsToRecord.md +2 -2
- package/docs/api/functions/createMiddleware.md +2 -2
- package/docs/api/functions/createPostgresDriver.md +2 -2
- package/docs/api/functions/createSqliteDriver.md +2 -2
- package/docs/api/functions/dbCast.md +3 -3
- package/docs/api/functions/dbCastIn.md +2 -2
- package/docs/api/functions/dbDynamic.md +3 -3
- package/docs/api/functions/dbFalse.md +2 -2
- package/docs/api/functions/dbImmediate.md +2 -2
- package/docs/api/functions/dbIn.md +2 -2
- package/docs/api/functions/dbNotNull.md +2 -2
- package/docs/api/functions/dbNow.md +2 -2
- package/docs/api/functions/dbNull.md +2 -2
- package/docs/api/functions/dbRaw.md +2 -2
- package/docs/api/functions/dbTrue.md +2 -2
- package/docs/api/functions/dbUuid.md +3 -3
- package/docs/api/functions/dbUuidIn.md +2 -2
- package/docs/api/functions/formatLocalDate.md +25 -0
- package/docs/api/functions/formatUTCDate.md +25 -0
- package/docs/api/functions/getDBConfig.md +2 -2
- package/docs/api/functions/getDBHandler.md +2 -2
- package/docs/api/functions/getTransactionConnection.md +2 -2
- package/docs/api/functions/getTransactionContext.md +2 -2
- package/docs/api/functions/hasMany.md +2 -2
- package/docs/api/functions/hasOne.md +2 -2
- package/docs/api/functions/initDBHandler.md +2 -2
- package/docs/api/functions/isAnySqlFragment.md +2 -2
- package/docs/api/functions/isConnectionError.md +26 -0
- package/docs/api/functions/isSqlCondition.md +2 -2
- package/docs/api/functions/isSqlFragment.md +2 -2
- package/docs/api/functions/isSqlRaw.md +2 -2
- package/docs/api/functions/isSqlRef.md +2 -2
- package/docs/api/functions/isSqlTypedFragment.md +2 -2
- package/docs/api/functions/model.md +6 -42
- package/docs/api/functions/parentRef.md +2 -2
- package/docs/api/functions/sql.md +7 -7
- package/docs/api/globals.md +57 -22
- package/docs/api/interfaces/Column.md +31 -31
- package/docs/api/interfaces/ColumnOptions.md +5 -4
- package/docs/api/interfaces/CreatedMiddlewareClass.md +7 -7
- package/docs/api/interfaces/DBConfig.md +13 -11
- package/docs/api/interfaces/DBConfigOptions.md +8 -8
- package/docs/api/interfaces/DeleteOptions.md +4 -4
- package/docs/api/interfaces/InsertOptions.md +8 -8
- package/docs/api/interfaces/LimitConfig.md +4 -4
- package/docs/api/interfaces/MiddlewareConfig.md +15 -15
- package/docs/api/interfaces/ModelOptions.md +8 -7
- package/docs/api/interfaces/PkeyResult.md +4 -4
- package/docs/api/interfaces/SelectOptions.md +17 -16
- package/docs/api/interfaces/SqlCondition.md +6 -6
- package/docs/api/interfaces/SqlFragment.md +5 -5
- package/docs/api/interfaces/SqlTypedFragment.md +7 -7
- package/docs/api/interfaces/TransactionOptions.md +7 -7
- package/docs/api/interfaces/UpdateManyOptions.md +4 -4
- package/docs/api/interfaces/UpdateOptions.md +4 -4
- package/docs/benchmark-chart.svg +225 -249
- package/package.json +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litedbmodel",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "A lightweight TypeScript ORM for PostgreSQL, MySQL, and SQLite with Active Record pattern",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"docker:up": "docker compose -f docker-compose.test.yml up -d",
|
|
47
47
|
"docker:down": "docker compose -f docker-compose.test.yml down",
|
|
48
48
|
"docker:reset": "docker compose -f docker-compose.test.yml down -v && docker compose -f docker-compose.test.yml up -d",
|
|
49
|
-
"test:integration:docker": "
|
|
49
|
+
"test:integration:docker": "docker compose -f docker-compose.test.yml run --rm --build test-integration; e=$?; npm run docker:down; exit $e",
|
|
50
50
|
"sync:versions": "node scripts/sync-versions.mjs",
|
|
51
51
|
"sync:versions:check": "node scripts/sync-versions.mjs --check",
|
|
52
52
|
"deps:check": "node scripts/check-no-local-deps.mjs",
|
|
53
|
+
"deps:installed": "node scripts/check-installed-deps.mjs",
|
|
53
54
|
"gates:check": "node scripts/check-reachable-test-gates.mjs",
|
|
54
55
|
"go:fmt:check": "node scripts/check-go-fmt.mjs",
|
|
55
56
|
"ts:test": "node scripts/check-ts-test-skips.mjs",
|
|
@@ -58,9 +59,10 @@
|
|
|
58
59
|
"go:test": "node scripts/check-go-test-skips.mjs",
|
|
59
60
|
"rust:test": "node scripts/check-rust-test-skips.mjs",
|
|
60
61
|
"pkg:check": "node scripts/check-package-entrypoints.mjs",
|
|
61
|
-
"types:check": "node scripts/check-
|
|
62
|
+
"types:check": "node scripts/check-typechecked-trees.mjs",
|
|
62
63
|
"tracked:check": "node scripts/check-tracked-files.mjs",
|
|
63
64
|
"spec:check": "node scripts/check-spec-refs.mjs",
|
|
65
|
+
"docs:bench:check": "node scripts/check-bench-docs.mjs",
|
|
64
66
|
"vendor:bc-php": "node scripts/vendor-behavior-contracts-php.mjs",
|
|
65
67
|
"vendor:bc-php:check": "node scripts/vendor-behavior-contracts-php.mjs --check",
|
|
66
68
|
"go:dispatch:check": "LITEDBMODEL_LIVEDB_VECTORS=\"$PWD/conformance/vectors-livedb/livedb.json\" sh -c 'cd go && exec go run ./conformance/livedb --check-coverage'",
|
|
@@ -74,7 +76,8 @@
|
|
|
74
76
|
"docker:livedb:down": "docker compose -f docker-compose.test.yml -f docker-compose.livedb.yml down -v",
|
|
75
77
|
"conformance:livedb:docker": "npm run docker:livedb:up && sleep 5 && npm run conformance:gen:livedb && npm run conformance:livedb; e=$?; npm run docker:livedb:down; exit $e",
|
|
76
78
|
"native:gen": "bash benchmark/crosslang/gen-native.sh generate",
|
|
77
|
-
"bench:codegen:drift": "bash benchmark/crosslang/gen-native.sh check"
|
|
79
|
+
"bench:codegen:drift": "bash benchmark/crosslang/gen-native.sh check",
|
|
80
|
+
"verify": "node scripts/verify-local.mjs"
|
|
78
81
|
},
|
|
79
82
|
"keywords": [
|
|
80
83
|
"orm",
|
|
@@ -108,6 +111,7 @@
|
|
|
108
111
|
"esbuild": "^0.28.1",
|
|
109
112
|
"eslint": "^9.39.4",
|
|
110
113
|
"globals": "^17.6.0",
|
|
114
|
+
"js-yaml": "4.3.0",
|
|
111
115
|
"mysql2": "^3.16.0",
|
|
112
116
|
"pg": "^8.11.3",
|
|
113
117
|
"terser": "^5.44.1",
|