@atscript/moost-db 0.1.64 → 0.1.66
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 -2
- package/dist/index.mjs +4 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1453,9 +1453,11 @@ let AsDbReadableController = class AsDbReadableController extends AsReadableCont
|
|
|
1453
1453
|
const annotations = fd.type?.metadata;
|
|
1454
1454
|
const annotatedFilterable = annotations?.has("db.column.filterable") ?? false;
|
|
1455
1455
|
const annotatedSortable = annotations?.has("db.column.sortable") ?? false;
|
|
1456
|
+
const adapterCanFilter = this.readable.canFilterField(fd);
|
|
1457
|
+
const adapterCanSort = this.readable.canSortField(fd);
|
|
1456
1458
|
fields[fd.path] = {
|
|
1457
|
-
sortable: sortableMode ? annotatedSortable : !!fd.isIndexed,
|
|
1458
|
-
filterable: filterableMode ? annotatedFilterable : true
|
|
1459
|
+
sortable: adapterCanSort && (sortableMode ? annotatedSortable : !!fd.isIndexed),
|
|
1460
|
+
filterable: adapterCanFilter && (filterableMode ? annotatedFilterable : true)
|
|
1459
1461
|
};
|
|
1460
1462
|
}
|
|
1461
1463
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -1452,9 +1452,11 @@ let AsDbReadableController = class AsDbReadableController extends AsReadableCont
|
|
|
1452
1452
|
const annotations = fd.type?.metadata;
|
|
1453
1453
|
const annotatedFilterable = annotations?.has("db.column.filterable") ?? false;
|
|
1454
1454
|
const annotatedSortable = annotations?.has("db.column.sortable") ?? false;
|
|
1455
|
+
const adapterCanFilter = this.readable.canFilterField(fd);
|
|
1456
|
+
const adapterCanSort = this.readable.canSortField(fd);
|
|
1455
1457
|
fields[fd.path] = {
|
|
1456
|
-
sortable: sortableMode ? annotatedSortable : !!fd.isIndexed,
|
|
1457
|
-
filterable: filterableMode ? annotatedFilterable : true
|
|
1458
|
+
sortable: adapterCanSort && (sortableMode ? annotatedSortable : !!fd.isIndexed),
|
|
1459
|
+
filterable: adapterCanFilter && (filterableMode ? annotatedFilterable : true)
|
|
1458
1460
|
};
|
|
1459
1461
|
}
|
|
1460
1462
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.66",
|
|
4
4
|
"description": "Generic database controller for Moost with Atscript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotations",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@uniqu/url": "^0.1.
|
|
41
|
+
"@uniqu/url": "^0.1.6"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@atscript/core": "^0.1.50",
|
|
45
45
|
"@atscript/typescript": "^0.1.50",
|
|
46
46
|
"@moostjs/event-http": "^0.6.8",
|
|
47
|
-
"@uniqu/core": "^0.1.
|
|
47
|
+
"@uniqu/core": "^0.1.6",
|
|
48
48
|
"@wooksjs/event-core": "^0.7.10",
|
|
49
49
|
"@wooksjs/event-http": "^0.7.10",
|
|
50
50
|
"@wooksjs/http-body": "^0.7.10",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@atscript/typescript": "^0.1.50",
|
|
56
56
|
"@moostjs/event-http": "^0.6.8",
|
|
57
|
-
"@uniqu/core": "^0.1.
|
|
57
|
+
"@uniqu/core": "^0.1.6",
|
|
58
58
|
"@wooksjs/event-core": "^0.7.10",
|
|
59
59
|
"@wooksjs/http-body": "^0.7.10",
|
|
60
60
|
"moost": "^0.6.8",
|
|
61
|
-
"@atscript/db": "^0.1.
|
|
61
|
+
"@atscript/db": "^0.1.66"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"postinstall": "asc -f dts",
|