@atscript/db-memory 0.1.144 → 0.1.146
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 +4 -6
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +4 -6
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1028,18 +1028,16 @@ var MemoryAdapter = class extends _atscript_db.BaseDbAdapter {
|
|
|
1028
1028
|
* so the store can never be mutated through a returned value.
|
|
1029
1029
|
*
|
|
1030
1030
|
* - No projection → a full clone.
|
|
1031
|
-
* - INCLUSION form (`{ field: 1 }`) → a new object with
|
|
1032
|
-
* paths
|
|
1031
|
+
* - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
|
|
1032
|
+
* paths — like the SQL adapters (since 0.1.145; it used to add the primary
|
|
1033
|
+
* key, which made projected responses differ across adapters).
|
|
1033
1034
|
* - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
|
|
1034
1035
|
*
|
|
1035
1036
|
* Top-level and nested dot-paths are supported; exotic Mongo projection
|
|
1036
1037
|
* quirks (array positional, `$slice`, etc.) are intentionally NOT replicated.
|
|
1037
1038
|
*/
|
|
1038
1039
|
_projectAndClone(row, $select) {
|
|
1039
|
-
return projectRow(row, $select?.asProjection, {
|
|
1040
|
-
pkFields: this._physicalPkFields(),
|
|
1041
|
-
clone: true
|
|
1042
|
-
});
|
|
1040
|
+
return projectRow(row, $select?.asProjection, { clone: true });
|
|
1043
1041
|
}
|
|
1044
1042
|
/**
|
|
1045
1043
|
* Reads the pagination/sort/projection controls with their intended types.
|
package/dist/index.d.cts
CHANGED
|
@@ -320,8 +320,9 @@ declare class MemoryAdapter extends BaseDbAdapter {
|
|
|
320
320
|
* so the store can never be mutated through a returned value.
|
|
321
321
|
*
|
|
322
322
|
* - No projection → a full clone.
|
|
323
|
-
* - INCLUSION form (`{ field: 1 }`) → a new object with
|
|
324
|
-
* paths
|
|
323
|
+
* - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
|
|
324
|
+
* paths — like the SQL adapters (since 0.1.145; it used to add the primary
|
|
325
|
+
* key, which made projected responses differ across adapters).
|
|
325
326
|
* - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
|
|
326
327
|
*
|
|
327
328
|
* Top-level and nested dot-paths are supported; exotic Mongo projection
|
package/dist/index.d.mts
CHANGED
|
@@ -320,8 +320,9 @@ declare class MemoryAdapter extends BaseDbAdapter {
|
|
|
320
320
|
* so the store can never be mutated through a returned value.
|
|
321
321
|
*
|
|
322
322
|
* - No projection → a full clone.
|
|
323
|
-
* - INCLUSION form (`{ field: 1 }`) → a new object with
|
|
324
|
-
* paths
|
|
323
|
+
* - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
|
|
324
|
+
* paths — like the SQL adapters (since 0.1.145; it used to add the primary
|
|
325
|
+
* key, which made projected responses differ across adapters).
|
|
325
326
|
* - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
|
|
326
327
|
*
|
|
327
328
|
* Top-level and nested dot-paths are supported; exotic Mongo projection
|
package/dist/index.mjs
CHANGED
|
@@ -1027,18 +1027,16 @@ var MemoryAdapter = class extends BaseDbAdapter {
|
|
|
1027
1027
|
* so the store can never be mutated through a returned value.
|
|
1028
1028
|
*
|
|
1029
1029
|
* - No projection → a full clone.
|
|
1030
|
-
* - INCLUSION form (`{ field: 1 }`) → a new object with
|
|
1031
|
-
* paths
|
|
1030
|
+
* - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
|
|
1031
|
+
* paths — like the SQL adapters (since 0.1.145; it used to add the primary
|
|
1032
|
+
* key, which made projected responses differ across adapters).
|
|
1032
1033
|
* - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
|
|
1033
1034
|
*
|
|
1034
1035
|
* Top-level and nested dot-paths are supported; exotic Mongo projection
|
|
1035
1036
|
* quirks (array positional, `$slice`, etc.) are intentionally NOT replicated.
|
|
1036
1037
|
*/
|
|
1037
1038
|
_projectAndClone(row, $select) {
|
|
1038
|
-
return projectRow(row, $select?.asProjection, {
|
|
1039
|
-
pkFields: this._physicalPkFields(),
|
|
1040
|
-
clone: true
|
|
1041
|
-
});
|
|
1039
|
+
return projectRow(row, $select?.asProjection, { clone: true });
|
|
1042
1040
|
}
|
|
1043
1041
|
/**
|
|
1044
1042
|
* Reads the pagination/sort/projection controls with their intended types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.146",
|
|
4
4
|
"description": "In-memory adapter for atscript-db.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@atscript/core": "^0.1.
|
|
40
|
-
"@atscript/typescript": "^0.1.
|
|
39
|
+
"@atscript/core": "^0.1.98",
|
|
40
|
+
"@atscript/typescript": "^0.1.98",
|
|
41
41
|
"@uniqu/core": "^0.1.11",
|
|
42
|
-
"unplugin-atscript": "^0.1.
|
|
42
|
+
"unplugin-atscript": "^0.1.98"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atscript/core": "^0.1.
|
|
46
|
-
"@atscript/typescript": "^0.1.
|
|
45
|
+
"@atscript/core": "^0.1.98",
|
|
46
|
+
"@atscript/typescript": "^0.1.98",
|
|
47
47
|
"@uniqu/core": "^0.1.11",
|
|
48
|
-
"@atscript/db": "^0.1.
|
|
48
|
+
"@atscript/db": "^0.1.146"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"postinstall": "asc -f dts",
|