@atscript/db-memory 0.1.137 → 0.1.138
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 +9 -0
- package/dist/index.d.cts +8 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.mjs +9 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1222,6 +1222,15 @@ var MemoryAdapter = class extends _atscript_db.BaseDbAdapter {
|
|
|
1222
1222
|
return this._peekState() !== void 0;
|
|
1223
1223
|
}
|
|
1224
1224
|
/**
|
|
1225
|
+
* Kind of the object stored under `name` in the space's in-memory database,
|
|
1226
|
+
* or `undefined` when nothing is. Lets schema sync refuse a table declared
|
|
1227
|
+
* where a view exists (and the reverse) and an FK to a table that is missing.
|
|
1228
|
+
* @since 0.1.138
|
|
1229
|
+
*/
|
|
1230
|
+
async getObjectKind(name) {
|
|
1231
|
+
return this._db.get(name)?.kind;
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1225
1234
|
* Drops a table by name: its rows, unique indexes and increment counters go,
|
|
1226
1235
|
* so the table added back starts empty. A missing table is not an error;
|
|
1227
1236
|
* a view under that name is (`dropViewByName` drops views).
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AggregateFn, BaseDbAdapter, BucketUnit, DbQuery, DbSpace, FilterExpr, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbUpdateResult, TFieldOps } from "@atscript/db";
|
|
1
|
+
import { AggregateFn, BaseDbAdapter, BucketUnit, DbQuery, DbSpace, FilterExpr, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbObjectKind, TDbUpdateResult, TFieldOps } from "@atscript/db";
|
|
2
2
|
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/memory-adapter.d.ts
|
|
@@ -396,6 +396,13 @@ declare class MemoryAdapter extends BaseDbAdapter {
|
|
|
396
396
|
* @since 0.1.137
|
|
397
397
|
*/
|
|
398
398
|
tableExists(): Promise<boolean>;
|
|
399
|
+
/**
|
|
400
|
+
* Kind of the object stored under `name` in the space's in-memory database,
|
|
401
|
+
* or `undefined` when nothing is. Lets schema sync refuse a table declared
|
|
402
|
+
* where a view exists (and the reverse) and an FK to a table that is missing.
|
|
403
|
+
* @since 0.1.138
|
|
404
|
+
*/
|
|
405
|
+
getObjectKind(name: string): Promise<TDbObjectKind | undefined>;
|
|
399
406
|
/**
|
|
400
407
|
* Drops a table by name: its rows, unique indexes and increment counters go,
|
|
401
408
|
* so the table added back starts empty. A missing table is not an error;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AggregateFn, BaseDbAdapter, BucketUnit, DbQuery, DbSpace, FilterExpr, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbUpdateResult, TFieldOps } from "@atscript/db";
|
|
1
|
+
import { AggregateFn, BaseDbAdapter, BucketUnit, DbQuery, DbSpace, FilterExpr, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbObjectKind, TDbUpdateResult, TFieldOps } from "@atscript/db";
|
|
2
2
|
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/memory-adapter.d.ts
|
|
@@ -396,6 +396,13 @@ declare class MemoryAdapter extends BaseDbAdapter {
|
|
|
396
396
|
* @since 0.1.137
|
|
397
397
|
*/
|
|
398
398
|
tableExists(): Promise<boolean>;
|
|
399
|
+
/**
|
|
400
|
+
* Kind of the object stored under `name` in the space's in-memory database,
|
|
401
|
+
* or `undefined` when nothing is. Lets schema sync refuse a table declared
|
|
402
|
+
* where a view exists (and the reverse) and an FK to a table that is missing.
|
|
403
|
+
* @since 0.1.138
|
|
404
|
+
*/
|
|
405
|
+
getObjectKind(name: string): Promise<TDbObjectKind | undefined>;
|
|
399
406
|
/**
|
|
400
407
|
* Drops a table by name: its rows, unique indexes and increment counters go,
|
|
401
408
|
* so the table added back starts empty. A missing table is not an error;
|
package/dist/index.mjs
CHANGED
|
@@ -1221,6 +1221,15 @@ var MemoryAdapter = class extends BaseDbAdapter {
|
|
|
1221
1221
|
return this._peekState() !== void 0;
|
|
1222
1222
|
}
|
|
1223
1223
|
/**
|
|
1224
|
+
* Kind of the object stored under `name` in the space's in-memory database,
|
|
1225
|
+
* or `undefined` when nothing is. Lets schema sync refuse a table declared
|
|
1226
|
+
* where a view exists (and the reverse) and an FK to a table that is missing.
|
|
1227
|
+
* @since 0.1.138
|
|
1228
|
+
*/
|
|
1229
|
+
async getObjectKind(name) {
|
|
1230
|
+
return this._db.get(name)?.kind;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1224
1233
|
* Drops a table by name: its rows, unique indexes and increment counters go,
|
|
1225
1234
|
* so the table added back starts empty. A missing table is not an error;
|
|
1226
1235
|
* a view under that name is (`dropViewByName` drops views).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.138",
|
|
4
4
|
"description": "In-memory adapter for atscript-db.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atscript/core": "^0.1.92",
|
|
46
46
|
"@atscript/typescript": "^0.1.92",
|
|
47
47
|
"@uniqu/core": "^0.1.11",
|
|
48
|
-
"@atscript/db": "^0.1.
|
|
48
|
+
"@atscript/db": "^0.1.138"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"postinstall": "asc -f dts",
|