@decaf-ts/core 0.5.1 → 0.5.3

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.
Files changed (206) hide show
  1. package/LICENSE.md +21 -157
  2. package/README.md +652 -15
  3. package/dist/core.cjs +2111 -133
  4. package/dist/core.esm.cjs +2112 -134
  5. package/lib/esm/identity/decorators.d.ts +52 -7
  6. package/lib/esm/identity/decorators.js +58 -13
  7. package/lib/esm/identity/index.js +3 -3
  8. package/lib/esm/identity/utils.d.ts +19 -0
  9. package/lib/esm/identity/utils.js +22 -3
  10. package/lib/esm/index.d.ts +10 -3
  11. package/lib/esm/index.js +19 -12
  12. package/lib/esm/interfaces/ErrorParser.d.ts +12 -0
  13. package/lib/esm/interfaces/ErrorParser.js +1 -1
  14. package/lib/esm/interfaces/Executor.d.ts +13 -0
  15. package/lib/esm/interfaces/Executor.js +1 -1
  16. package/lib/esm/interfaces/Observable.d.ts +27 -0
  17. package/lib/esm/interfaces/Observable.js +1 -1
  18. package/lib/esm/interfaces/Observer.d.ts +12 -0
  19. package/lib/esm/interfaces/Observer.js +1 -1
  20. package/lib/esm/interfaces/Paginatable.d.ts +15 -0
  21. package/lib/esm/interfaces/Paginatable.js +1 -1
  22. package/lib/esm/interfaces/Queriable.d.ts +34 -9
  23. package/lib/esm/interfaces/Queriable.js +1 -1
  24. package/lib/esm/interfaces/RawExecutor.d.ts +14 -0
  25. package/lib/esm/interfaces/RawExecutor.js +1 -1
  26. package/lib/esm/interfaces/SequenceOptions.d.ts +52 -0
  27. package/lib/esm/interfaces/SequenceOptions.js +19 -1
  28. package/lib/esm/interfaces/index.js +8 -8
  29. package/lib/esm/model/BaseModel.d.ts +31 -0
  30. package/lib/esm/model/BaseModel.js +24 -1
  31. package/lib/esm/model/construction.d.ts +433 -0
  32. package/lib/esm/model/construction.js +444 -5
  33. package/lib/esm/model/decorators.d.ts +159 -29
  34. package/lib/esm/model/decorators.js +167 -37
  35. package/lib/esm/model/index.js +5 -5
  36. package/lib/esm/model/types.d.ts +9 -0
  37. package/lib/esm/model/types.js +1 -1
  38. package/lib/esm/persistence/Adapter.d.ts +358 -17
  39. package/lib/esm/persistence/Adapter.js +292 -24
  40. package/lib/esm/persistence/Dispatch.d.ts +114 -1
  41. package/lib/esm/persistence/Dispatch.js +104 -6
  42. package/lib/esm/persistence/ObserverHandler.d.ts +95 -0
  43. package/lib/esm/persistence/ObserverHandler.js +96 -1
  44. package/lib/esm/persistence/Sequence.d.ts +89 -0
  45. package/lib/esm/persistence/Sequence.js +71 -2
  46. package/lib/esm/persistence/constants.d.ts +22 -0
  47. package/lib/esm/persistence/constants.js +23 -1
  48. package/lib/esm/persistence/decorators.d.ts +10 -0
  49. package/lib/esm/persistence/decorators.js +13 -3
  50. package/lib/esm/persistence/errors.d.ts +23 -0
  51. package/lib/esm/persistence/errors.js +24 -1
  52. package/lib/esm/persistence/index.js +9 -9
  53. package/lib/esm/persistence/types.d.ts +18 -0
  54. package/lib/esm/persistence/types.js +1 -1
  55. package/lib/esm/query/Condition.d.ts +78 -31
  56. package/lib/esm/query/Condition.js +134 -55
  57. package/lib/esm/query/Paginator.d.ts +56 -0
  58. package/lib/esm/query/Paginator.js +58 -2
  59. package/lib/esm/query/Statement.d.ts +51 -0
  60. package/lib/esm/query/Statement.js +55 -4
  61. package/lib/esm/query/constants.d.ts +25 -0
  62. package/lib/esm/query/constants.js +26 -1
  63. package/lib/esm/query/errors.d.ts +14 -0
  64. package/lib/esm/query/errors.js +15 -1
  65. package/lib/esm/query/index.js +8 -8
  66. package/lib/esm/query/options.d.ts +21 -3
  67. package/lib/esm/query/options.js +1 -1
  68. package/lib/esm/query/selectors.d.ts +26 -0
  69. package/lib/esm/query/selectors.js +1 -1
  70. package/lib/esm/ram/RamAdapter.d.ts +311 -0
  71. package/lib/esm/ram/RamAdapter.js +319 -8
  72. package/lib/esm/ram/RamContext.d.ts +16 -1
  73. package/lib/esm/ram/RamContext.js +18 -3
  74. package/lib/esm/ram/RamPaginator.d.ts +43 -0
  75. package/lib/esm/ram/RamPaginator.js +55 -3
  76. package/lib/esm/ram/RamSequence.d.ts +61 -0
  77. package/lib/esm/ram/RamSequence.js +66 -5
  78. package/lib/esm/ram/RamStatement.d.ts +74 -0
  79. package/lib/esm/ram/RamStatement.js +78 -4
  80. package/lib/esm/ram/constants.d.ts +8 -0
  81. package/lib/esm/ram/constants.js +9 -1
  82. package/lib/esm/ram/handlers.d.ts +19 -0
  83. package/lib/esm/ram/handlers.js +21 -2
  84. package/lib/esm/ram/index.js +11 -11
  85. package/lib/esm/ram/model/RamSequence.d.ts +25 -0
  86. package/lib/esm/ram/model/RamSequence.js +21 -3
  87. package/lib/esm/ram/model/index.js +2 -2
  88. package/lib/esm/ram/types.d.ts +42 -0
  89. package/lib/esm/ram/types.js +1 -1
  90. package/lib/esm/repository/Repository.d.ts +363 -8
  91. package/lib/esm/repository/Repository.js +369 -24
  92. package/lib/esm/repository/constants.d.ts +25 -0
  93. package/lib/esm/repository/constants.js +26 -1
  94. package/lib/esm/repository/decorators.d.ts +27 -0
  95. package/lib/esm/repository/decorators.js +29 -2
  96. package/lib/esm/repository/errors.d.ts +12 -5
  97. package/lib/esm/repository/errors.js +13 -6
  98. package/lib/esm/repository/index.js +8 -8
  99. package/lib/esm/repository/injectables.d.ts +18 -0
  100. package/lib/esm/repository/injectables.js +23 -5
  101. package/lib/esm/repository/types.d.ts +15 -0
  102. package/lib/esm/repository/types.js +1 -1
  103. package/lib/esm/repository/utils.d.ts +11 -0
  104. package/lib/esm/repository/utils.js +15 -4
  105. package/lib/esm/utils/decorators.d.ts +8 -0
  106. package/lib/esm/utils/decorators.js +9 -1
  107. package/lib/esm/utils/errors.d.ts +46 -0
  108. package/lib/esm/utils/errors.js +47 -1
  109. package/lib/esm/utils/index.js +3 -3
  110. package/lib/identity/decorators.cjs +53 -8
  111. package/lib/identity/decorators.d.ts +52 -7
  112. package/lib/identity/utils.cjs +20 -1
  113. package/lib/identity/utils.d.ts +19 -0
  114. package/lib/index.cjs +11 -4
  115. package/lib/index.d.ts +10 -3
  116. package/lib/interfaces/ErrorParser.cjs +1 -1
  117. package/lib/interfaces/ErrorParser.d.ts +12 -0
  118. package/lib/interfaces/Executor.cjs +1 -1
  119. package/lib/interfaces/Executor.d.ts +13 -0
  120. package/lib/interfaces/Observable.cjs +1 -1
  121. package/lib/interfaces/Observable.d.ts +27 -0
  122. package/lib/interfaces/Observer.cjs +1 -1
  123. package/lib/interfaces/Observer.d.ts +12 -0
  124. package/lib/interfaces/Paginatable.cjs +1 -1
  125. package/lib/interfaces/Paginatable.d.ts +15 -0
  126. package/lib/interfaces/Queriable.cjs +1 -1
  127. package/lib/interfaces/Queriable.d.ts +34 -9
  128. package/lib/interfaces/RawExecutor.cjs +1 -1
  129. package/lib/interfaces/RawExecutor.d.ts +14 -0
  130. package/lib/interfaces/SequenceOptions.cjs +19 -1
  131. package/lib/interfaces/SequenceOptions.d.ts +52 -0
  132. package/lib/model/BaseModel.cjs +24 -1
  133. package/lib/model/BaseModel.d.ts +31 -0
  134. package/lib/model/construction.cjs +441 -2
  135. package/lib/model/construction.d.ts +433 -0
  136. package/lib/model/decorators.cjs +160 -30
  137. package/lib/model/decorators.d.ts +159 -29
  138. package/lib/model/types.cjs +1 -1
  139. package/lib/model/types.d.ts +9 -0
  140. package/lib/persistence/Adapter.cjs +287 -19
  141. package/lib/persistence/Adapter.d.ts +358 -17
  142. package/lib/persistence/Dispatch.cjs +102 -4
  143. package/lib/persistence/Dispatch.d.ts +114 -1
  144. package/lib/persistence/ObserverHandler.cjs +96 -1
  145. package/lib/persistence/ObserverHandler.d.ts +95 -0
  146. package/lib/persistence/Sequence.cjs +70 -1
  147. package/lib/persistence/Sequence.d.ts +89 -0
  148. package/lib/persistence/constants.cjs +23 -1
  149. package/lib/persistence/constants.d.ts +22 -0
  150. package/lib/persistence/decorators.cjs +11 -1
  151. package/lib/persistence/decorators.d.ts +10 -0
  152. package/lib/persistence/errors.cjs +24 -1
  153. package/lib/persistence/errors.d.ts +23 -0
  154. package/lib/persistence/types.cjs +1 -1
  155. package/lib/persistence/types.d.ts +18 -0
  156. package/lib/query/Condition.cjs +132 -53
  157. package/lib/query/Condition.d.ts +78 -31
  158. package/lib/query/Paginator.cjs +57 -1
  159. package/lib/query/Paginator.d.ts +56 -0
  160. package/lib/query/Statement.cjs +52 -1
  161. package/lib/query/Statement.d.ts +51 -0
  162. package/lib/query/constants.cjs +26 -1
  163. package/lib/query/constants.d.ts +25 -0
  164. package/lib/query/errors.cjs +15 -1
  165. package/lib/query/errors.d.ts +14 -0
  166. package/lib/query/options.cjs +1 -1
  167. package/lib/query/options.d.ts +21 -3
  168. package/lib/query/selectors.cjs +1 -1
  169. package/lib/query/selectors.d.ts +26 -0
  170. package/lib/ram/RamAdapter.cjs +312 -1
  171. package/lib/ram/RamAdapter.d.ts +311 -0
  172. package/lib/ram/RamContext.cjs +18 -3
  173. package/lib/ram/RamContext.d.ts +16 -1
  174. package/lib/ram/RamPaginator.cjs +54 -2
  175. package/lib/ram/RamPaginator.d.ts +43 -0
  176. package/lib/ram/RamSequence.cjs +63 -2
  177. package/lib/ram/RamSequence.d.ts +61 -0
  178. package/lib/ram/RamStatement.cjs +75 -1
  179. package/lib/ram/RamStatement.d.ts +74 -0
  180. package/lib/ram/constants.cjs +9 -1
  181. package/lib/ram/constants.d.ts +8 -0
  182. package/lib/ram/handlers.cjs +20 -1
  183. package/lib/ram/handlers.d.ts +19 -0
  184. package/lib/ram/model/RamSequence.cjs +19 -1
  185. package/lib/ram/model/RamSequence.d.ts +25 -0
  186. package/lib/ram/types.cjs +1 -1
  187. package/lib/ram/types.d.ts +42 -0
  188. package/lib/repository/Repository.cjs +360 -15
  189. package/lib/repository/Repository.d.ts +363 -8
  190. package/lib/repository/constants.cjs +26 -1
  191. package/lib/repository/constants.d.ts +25 -0
  192. package/lib/repository/decorators.cjs +28 -1
  193. package/lib/repository/decorators.d.ts +27 -0
  194. package/lib/repository/errors.cjs +13 -6
  195. package/lib/repository/errors.d.ts +12 -5
  196. package/lib/repository/injectables.cjs +19 -1
  197. package/lib/repository/injectables.d.ts +18 -0
  198. package/lib/repository/types.cjs +1 -1
  199. package/lib/repository/types.d.ts +15 -0
  200. package/lib/repository/utils.cjs +12 -1
  201. package/lib/repository/utils.d.ts +11 -0
  202. package/lib/utils/decorators.cjs +9 -1
  203. package/lib/utils/decorators.d.ts +8 -0
  204. package/lib/utils/errors.cjs +47 -1
  205. package/lib/utils/errors.d.ts +46 -0
  206. package/package.json +5 -5
@@ -8,6 +8,7 @@ import { Paginatable } from "../interfaces/Paginatable";
8
8
  * @description Exposes the GROUP BY method and remaining options
9
9
  *
10
10
  * @interface GroupByOption
11
+ * @memberOf module:core
11
12
  */
12
13
  export interface GroupByOption<M extends Model, R> extends Executor<R> {
13
14
  groupBy(selector: GroupBySelector<M>): Executor<R>;
@@ -17,6 +18,7 @@ export interface GroupByOption<M extends Model, R> extends Executor<R> {
17
18
  * @description Exposes the OFFSET method and remaining options
18
19
  *
19
20
  * @interface GroupByOption
21
+ * @memberOf module:core
20
22
  */
21
23
  export interface OffsetOption<R> extends Executor<R> {
22
24
  offset(selector: OffsetSelector): Executor<R>;
@@ -26,6 +28,7 @@ export interface OffsetOption<R> extends Executor<R> {
26
28
  * @description Exposes the LIMIT method and remaining options
27
29
  *
28
30
  * @interface LimitOption
31
+ * @memberOf module:core
29
32
  */
30
33
  export interface LimitOption<M extends Model, R> extends Executor<R>, Paginatable<M, R, any> {
31
34
  limit(selector: LimitSelector): OffsetOption<R>;
@@ -35,6 +38,7 @@ export interface LimitOption<M extends Model, R> extends Executor<R>, Paginatabl
35
38
  * @description Exposes the ORDER BY method and remaining options
36
39
  *
37
40
  * @interface OrderByOption
41
+ * @memberOf module:core
38
42
  */
39
43
  export interface OrderByOption<M extends Model, R> extends Executor<R>, Paginatable<M, R, any> {
40
44
  orderBy(selector: OrderBySelector<M>): LimitOption<M, R> & OffsetOption<R>;
@@ -44,6 +48,7 @@ export interface OrderByOption<M extends Model, R> extends Executor<R>, Paginata
44
48
  * @description Exposes the ORDER BY method and remaining options
45
49
  *
46
50
  * @interface ThenByOption
51
+ * @memberOf module:core
47
52
  */
48
53
  export interface ThenByOption<M extends Model, R> extends LimitOption<M, R>, OffsetOption<R>, Executor<R>, Paginatable<M, R, any> {
49
54
  thenBy(selector: OrderBySelector<M>): ThenByOption<M, R>;
@@ -56,6 +61,7 @@ export interface ThenByOption<M extends Model, R> extends LimitOption<M, R>, Off
56
61
  * @extends GroupByOption
57
62
  * @extends LimitOption
58
63
  * @extends OffsetOption
64
+ * @memberOf module:core
59
65
  */
60
66
  export interface OrderAndGroupOption<M extends Model, R> extends OrderByOption<M, R>, Executor<R>, GroupByOption<M, R>, LimitOption<M, R>, OffsetOption<R> {
61
67
  }
@@ -65,6 +71,7 @@ export interface OrderAndGroupOption<M extends Model, R> extends OrderByOption<M
65
71
  *
66
72
  * @interface WhereOption
67
73
  * @extends OrderAndGroupOption
74
+ * @memberOf module:core
68
75
  */
69
76
  export interface WhereOption<M extends Model, R> extends OrderAndGroupOption<M, R> {
70
77
  /**
@@ -80,6 +87,7 @@ export interface WhereOption<M extends Model, R> extends OrderAndGroupOption<M,
80
87
  * @description Exposes the FROM method and remaining options
81
88
  *
82
89
  * @interface FromOption
90
+ * @memberOf module:core
83
91
  */
84
92
  export interface FromOption<M extends Model, R> {
85
93
  /**
@@ -96,6 +104,7 @@ export interface FromOption<M extends Model, R> {
96
104
  *
97
105
  * @interface DistinctOption
98
106
  * @extends FromOption
107
+ * @memberOf module:core
99
108
  */
100
109
  export interface DistinctOption<M extends Model, R> extends FromOption<M, R> {
101
110
  }
@@ -105,6 +114,7 @@ export interface DistinctOption<M extends Model, R> extends FromOption<M, R> {
105
114
  *
106
115
  * @interface MaxOption
107
116
  * @extends FromOption
117
+ * @memberOf module:core
108
118
  */
109
119
  export interface MaxOption<M extends Model, R> extends FromOption<M, R> {
110
120
  }
@@ -114,6 +124,7 @@ export interface MaxOption<M extends Model, R> extends FromOption<M, R> {
114
124
  *
115
125
  * @interface MinOption
116
126
  * @extends FromOption
127
+ * @memberOf module:core
117
128
  */
118
129
  export interface MinOption<M extends Model, R> extends FromOption<M, R> {
119
130
  }
@@ -123,6 +134,7 @@ export interface MinOption<M extends Model, R> extends FromOption<M, R> {
123
134
  *
124
135
  * @interface CountOption
125
136
  * @extends FromOption
137
+ * @memberOf module:core
126
138
  */
127
139
  export interface CountOption<M extends Model, R> extends FromOption<M, R> {
128
140
  }
@@ -132,6 +144,7 @@ export interface CountOption<M extends Model, R> extends FromOption<M, R> {
132
144
  *
133
145
  * @interface SelectOption
134
146
  * @extends FromOption
147
+ * @memberOf module:core
135
148
  */
136
149
  export interface SelectOption<M extends Model, R> extends FromOption<M, R> {
137
150
  distinct<S extends SelectSelector<M>>(selector: S): DistinctOption<M, M[S][]>;
@@ -144,6 +157,7 @@ export interface SelectOption<M extends Model, R> extends FromOption<M, R> {
144
157
  * @description Exposes the remaining options after an INTO
145
158
  *
146
159
  * @interface IntoOption
160
+ * @memberOf module:core
147
161
  */
148
162
  export interface IntoOption<M extends Model, R> {
149
163
  values(...models: M[]): Executor<R>;
@@ -154,6 +168,7 @@ export interface IntoOption<M extends Model, R> {
154
168
  * @description Exposes the remaining options after a VALUES
155
169
  *
156
170
  * @interface ValuesOption
171
+ * @memberOf module:core
157
172
  */
158
173
  export interface ValuesOption<M extends Model> extends Executor<M> {
159
174
  }
@@ -162,6 +177,7 @@ export interface ValuesOption<M extends Model> extends Executor<M> {
162
177
  * @description Exposes the remaining options after an INSERT
163
178
  *
164
179
  * @interface InsertOption
180
+ * @memberOf module:core
165
181
  */
166
182
  export interface InsertOption<M extends Model, R = void> {
167
183
  /**
@@ -177,6 +193,7 @@ export interface InsertOption<M extends Model, R = void> {
177
193
  * @description Exposes the available operators for a {@link Condition}
178
194
  *
179
195
  * @interface AttributeOption
196
+ * @memberOf module:core
180
197
  */
181
198
  export interface AttributeOption<M extends Model> {
182
199
  /**
@@ -235,10 +252,11 @@ export interface AttributeOption<M extends Model> {
235
252
  regexp(val: string | RegExp): Condition<M>;
236
253
  }
237
254
  /**
238
- * @summary The starting point for creating Conditions
239
- * @description Exposes the available operations for a {@link Condition}
240
- *
255
+ * @description The starting point for creating query conditions
256
+ * @summary Exposes the available operations for building database query conditions
257
+ * @template M - The model type this condition builder operates on
241
258
  * @interface ConditionBuilderOption
259
+ * @memberOf module:core
242
260
  */
243
261
  export interface ConditionBuilderOption<M extends Model> {
244
262
  attribute(attr: keyof M): AttributeOption<M>;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0b3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3F1ZXJ5L3NlbGVjdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgT3JkZXJEaXJlY3Rpb24gfSBmcm9tIFwiLi4vcmVwb3NpdG9yeVwiO1xuaW1wb3J0IHsgQ29uc3RydWN0b3IsIE1vZGVsIH0gZnJvbSBcIkBkZWNhZi10cy9kZWNvcmF0b3ItdmFsaWRhdGlvblwiO1xuXG5leHBvcnQgdHlwZSBGcm9tU2VsZWN0b3I8TSBleHRlbmRzIE1vZGVsPiA9IENvbnN0cnVjdG9yPE0+IHwgc3RyaW5nO1xuXG5leHBvcnQgdHlwZSBHcm91cEJ5U2VsZWN0b3I8TSBleHRlbmRzIE1vZGVsPiA9IGtleW9mIE07XG5cbmV4cG9ydCB0eXBlIE9yZGVyQnlTZWxlY3RvcjxNIGV4dGVuZHMgTW9kZWw+ID0gW2tleW9mIE0sIE9yZGVyRGlyZWN0aW9uXTtcblxuZXhwb3J0IHR5cGUgTGltaXRTZWxlY3RvciA9IG51bWJlcjtcblx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WxlY3RvclxuICogQG1lbWJlck9mIG1vZHVsZTpjb3JlXG4gKi9cbmV4cG9ydCB0eXBlIFNlbGVjdFNlbGVjdG9yPE0gZXh0ZW5kcyBNb2RlbD4gPSBrZXlvZiBNO1xuIl19
@@ -1,8 +1,34 @@
1
1
  import { OrderDirection } from "../repository";
2
2
  import { Constructor, Model } from "@decaf-ts/decorator-validation";
3
+ /**
4
+ * @description Type for selecting the data source in a query
5
+ * @summary Defines the type for specifying the table or model to query from
6
+ * @template M - The model type this selector operates on
7
+ * @typedef {Constructor<M> | string} FromSelector
8
+ * @memberOf module:core
9
+ */
3
10
  export type FromSelector<M extends Model> = Constructor<M> | string;
4
11
  export type GroupBySelector<M extends Model> = keyof M;
5
12
  export type OrderBySelector<M extends Model> = [keyof M, OrderDirection];
13
+ /**
14
+ * @description Type for limiting query results
15
+ * @summary Defines the type for specifying the maximum number of results to return
16
+ * @typedef {number} LimitSelector
17
+ * @memberOf module:core
18
+ */
6
19
  export type LimitSelector = number;
20
+ /**
21
+ * @description Type for offsetting query results
22
+ * @summary Defines the type for specifying the number of results to skip
23
+ * @typedef {number} OffsetSelector
24
+ * @memberOf module:core
25
+ */
7
26
  export type OffsetSelector = number;
27
+ /**
28
+ * @description Type for selecting fields in a query
29
+ * @summary Defines the type for specifying which fields to select from a model
30
+ * @template M - The model type this selector operates on
31
+ * @typedef SelectSelector
32
+ * @memberOf module:core
33
+ */
8
34
  export type SelectSelector<M extends Model> = keyof M;