ramdb2-core 2.0.0-alpha.6 → 2.0.0-alpha.7
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/DbObject.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# ramdb2-core
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.7
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8fa4d07: `@transient(getter: true)`: a getter of the class gives the value of the field, so a query filters and sorts on it (`static transientGetters`), and `RdbCrud` sorts its column by default. ramdb2-server refuses to start when the getter is missing, and refuses in a query a `@transient` resolved by GraphQL only (D62).
|
|
8
|
+
|
|
3
9
|
## 2.0.0-alpha.6
|
|
4
10
|
|
|
5
11
|
No changes in this release.
|
package/package.json
CHANGED
package/src/DbObject.js
CHANGED
|
@@ -65,6 +65,19 @@ export default class DbObject {
|
|
|
65
65
|
*/
|
|
66
66
|
static restrictedFields = []
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* The @transient fields: not stored, resolved for the GraphQL API by a getter of the class or by a resolver.
|
|
70
|
+
* @type {string[]}
|
|
71
|
+
*/
|
|
72
|
+
static transient = []
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The @transient fields whose value is a getter of the class (@transient(getter: true), D62): ramdb2-server
|
|
76
|
+
* checks the getter at start, and lets a query filter and sort on them.
|
|
77
|
+
* @type {string[]}
|
|
78
|
+
*/
|
|
79
|
+
static transientGetters = []
|
|
80
|
+
|
|
68
81
|
/**
|
|
69
82
|
* The list relations: the table of their objects and the foreign key that points to this object.
|
|
70
83
|
* @type {Record<string, {table: string, key: string}>}
|