@decaf-ts/for-couchdb 0.4.3 → 0.4.4

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 (57) hide show
  1. package/dist/for-couchdb.cjs +1 -1
  2. package/dist/for-couchdb.cjs.map +1 -1
  3. package/dist/for-couchdb.js +1 -1
  4. package/dist/for-couchdb.js.map +1 -1
  5. package/lib/adapter.cjs +77 -37
  6. package/lib/adapter.d.ts +50 -22
  7. package/lib/adapter.js.map +1 -1
  8. package/lib/esm/adapter.d.ts +50 -22
  9. package/lib/esm/adapter.js +70 -30
  10. package/lib/esm/adapter.js.map +1 -1
  11. package/lib/esm/index.d.ts +2 -2
  12. package/lib/esm/index.js +2 -2
  13. package/lib/esm/index.js.map +1 -1
  14. package/lib/esm/indexes/generator.js +4 -3
  15. package/lib/esm/indexes/generator.js.map +1 -1
  16. package/lib/esm/query/Paginator.d.ts +1 -1
  17. package/lib/esm/query/Paginator.js +4 -3
  18. package/lib/esm/query/Paginator.js.map +1 -1
  19. package/lib/esm/query/Statement.d.ts +6 -5
  20. package/lib/esm/query/Statement.js +8 -7
  21. package/lib/esm/query/Statement.js.map +1 -1
  22. package/lib/esm/repository.d.ts +39 -0
  23. package/lib/esm/repository.js +147 -0
  24. package/lib/esm/repository.js.map +1 -0
  25. package/lib/esm/sequences/Sequence.d.ts +19 -18
  26. package/lib/esm/sequences/Sequence.js +33 -28
  27. package/lib/esm/sequences/Sequence.js.map +1 -1
  28. package/lib/index.cjs +2 -2
  29. package/lib/index.d.ts +2 -2
  30. package/lib/index.js.map +1 -1
  31. package/lib/indexes/generator.cjs +3 -2
  32. package/lib/indexes/generator.js.map +1 -1
  33. package/lib/query/Paginator.cjs +4 -3
  34. package/lib/query/Paginator.d.ts +1 -1
  35. package/lib/query/Paginator.js.map +1 -1
  36. package/lib/query/Statement.cjs +7 -6
  37. package/lib/query/Statement.d.ts +6 -5
  38. package/lib/query/Statement.js.map +1 -1
  39. package/lib/repository.cjs +151 -0
  40. package/lib/repository.d.ts +39 -0
  41. package/lib/repository.js.map +1 -0
  42. package/lib/sequences/Sequence.cjs +31 -26
  43. package/lib/sequences/Sequence.d.ts +19 -18
  44. package/lib/sequences/Sequence.js.map +1 -1
  45. package/package.json +1 -2
  46. package/lib/esm/interfaces/CouchDBRepository.d.ts +0 -16
  47. package/lib/esm/interfaces/CouchDBRepository.js +0 -2
  48. package/lib/esm/interfaces/CouchDBRepository.js.map +0 -1
  49. package/lib/esm/interfaces/index.d.ts +0 -1
  50. package/lib/esm/interfaces/index.js +0 -2
  51. package/lib/esm/interfaces/index.js.map +0 -1
  52. package/lib/interfaces/CouchDBRepository.cjs +0 -3
  53. package/lib/interfaces/CouchDBRepository.d.ts +0 -16
  54. package/lib/interfaces/CouchDBRepository.js.map +0 -1
  55. package/lib/interfaces/index.cjs +0 -18
  56. package/lib/interfaces/index.d.ts +0 -1
  57. package/lib/interfaces/index.js.map +0 -1
@@ -16,17 +16,19 @@ const core_2 = require("@decaf-ts/core");
16
16
  */
17
17
  class CouchDBSequence extends core_2.Sequence {
18
18
  constructor(options, adapter) {
19
- super(options);
19
+ super(options, adapter);
20
20
  this.repo = core_1.Repository.forModel(CouchDBSequence_1.Sequence, adapter.alias);
21
21
  }
22
22
  /**
23
23
  * @summary Retrieves the current value for the sequence
24
24
  * @protected
25
25
  */
26
- async current() {
26
+ async current(...args) {
27
+ const contextArgs = await db_decorators_1.Context.args(db_decorators_1.OperationKeys.READ, CouchDBSequence_1.Sequence, args, this.adapter);
28
+ const ctx = contextArgs.context;
27
29
  const { name, startWith } = this.options;
28
30
  try {
29
- const sequence = await this.repo.read(name);
31
+ const sequence = await this.repo.read(name, ctx);
30
32
  return this.parse(sequence.current);
31
33
  }
32
34
  catch (e) {
@@ -43,15 +45,6 @@ class CouchDBSequence extends core_2.Sequence {
43
45
  throw new db_decorators_1.InternalError(`Failed to retrieve current value for sequence ${name}: ${e}`);
44
46
  }
45
47
  }
46
- /**
47
- * @summary Parses the {@link Sequence} value
48
- *
49
- * @protected
50
- * @param value
51
- */
52
- parse(value) {
53
- return core_2.Sequence.parseValue(this.options.type, value);
54
- }
55
48
  /**
56
49
  * @summary increments the sequence
57
50
  * @description Sequence specific implementation
@@ -60,7 +53,7 @@ class CouchDBSequence extends core_2.Sequence {
60
53
  * @param count
61
54
  * @protected
62
55
  */
63
- async increment(current, count) {
56
+ async increment(current, count, ctx) {
64
57
  const { type, incrementBy, name } = this.options;
65
58
  let next;
66
59
  const toIncrementBy = count || incrementBy;
@@ -78,34 +71,46 @@ class CouchDBSequence extends core_2.Sequence {
78
71
  }
79
72
  let seq;
80
73
  try {
81
- seq = await this.repo.update(new CouchDBSequence_1.Sequence({ id: name, current: next }));
74
+ seq = await this.repo.update(new CouchDBSequence_1.Sequence({ id: name, current: next }), ctx);
82
75
  }
83
76
  catch (e) {
84
77
  if (!(e instanceof db_decorators_1.NotFoundError))
85
78
  throw e;
86
- seq = await this.repo.create(new CouchDBSequence_1.Sequence({ id: name, current: next }));
79
+ seq = await this.repo.create(new CouchDBSequence_1.Sequence({ id: name, current: next }), ctx);
87
80
  }
88
81
  return seq.current;
89
82
  }
90
83
  /**
91
- * @summary Generates the next value in th sequence
92
- * @description calls {@link Sequence#parse} on the current value
93
- * followed by {@link Sequence#increment}
94
- *
84
+ * @description Gets the next value in the sequence
85
+ * @summary Retrieves the current value of the sequence and increments it by the
86
+ * configured increment amount. This is the main method used to get a new sequential value.
87
+ * @return A promise that resolves to the next value in the sequence
95
88
  */
96
- async next() {
97
- const current = await this.current();
98
- return this.increment(current);
89
+ async next(...argz) {
90
+ const contextArgs = await db_decorators_1.Context.args(db_decorators_1.OperationKeys.UPDATE, CouchDBSequence_1.Sequence, argz, this.adapter);
91
+ const { context, args } = contextArgs;
92
+ const current = await this.current(...args);
93
+ return this.increment(current, undefined, context);
99
94
  }
100
- async range(count) {
101
- const current = (await this.current());
95
+ /**
96
+ * @description Generates a range of sequential values
97
+ * @summary Retrieves a specified number of sequential values from the sequence.
98
+ * This is useful when you need to allocate multiple IDs at once.
99
+ * The method increments the sequence by the total amount needed and returns all values in the range.
100
+ * @param {number} count - The number of sequential values to generate
101
+ * @return A promise that resolves to an array of sequential values
102
+ */
103
+ async range(count, ...argz) {
104
+ const contextArgs = await db_decorators_1.Context.args(db_decorators_1.OperationKeys.UPDATE, CouchDBSequence_1.Sequence, argz, this.adapter);
105
+ const { context, args } = contextArgs;
106
+ const current = (await this.current(...args));
102
107
  const incrementBy = this.parse(this.options.incrementBy);
103
- const next = await this.increment(current, this.parse(count) * incrementBy);
108
+ const next = await this.increment(current, this.parse(count) * incrementBy, context);
104
109
  const range = [];
105
110
  for (let i = 1; i <= count; i++) {
106
111
  range.push(current + incrementBy * this.parse(i));
107
112
  }
108
- if (range[range.length - 1] !== next)
113
+ if (range[range.length - 1] !== next && this.options.type !== "String")
109
114
  throw new db_decorators_1.InternalError("Miscalculation of range");
110
115
  return range;
111
116
  }
@@ -1,8 +1,8 @@
1
1
  import { Sequence as Seq } from "../model/CouchDBSequence";
2
- import { Adapter, SequenceOptions } from "@decaf-ts/core";
2
+ import { Adapter, MaybeContextualArg, SequenceOptions } from "@decaf-ts/core";
3
3
  import { Sequence } from "@decaf-ts/core";
4
4
  import { MangoQuery } from "../types";
5
- import { CouchDBRepository } from "../interfaces";
5
+ import { CouchDBRepository } from "../repository";
6
6
  /**
7
7
  * @summary Abstract implementation of a Sequence
8
8
  * @description provides the basic functionality for {@link Sequence}s
@@ -13,20 +13,13 @@ import { CouchDBRepository } from "../interfaces";
13
13
  * @implements Sequence
14
14
  */
15
15
  export declare class CouchDBSequence extends Sequence {
16
- protected repo: CouchDBRepository<Seq, any, any, any, any>;
17
- constructor(options: SequenceOptions, adapter: Adapter<any, any, MangoQuery, any, any>);
16
+ protected repo: CouchDBRepository<Seq, any>;
17
+ constructor(options: SequenceOptions, adapter: Adapter<any, any, MangoQuery, any>);
18
18
  /**
19
19
  * @summary Retrieves the current value for the sequence
20
20
  * @protected
21
21
  */
22
- current(): Promise<string | number | bigint>;
23
- /**
24
- * @summary Parses the {@link Sequence} value
25
- *
26
- * @protected
27
- * @param value
28
- */
29
- private parse;
22
+ current(...args: MaybeContextualArg<any>): Promise<string | number | bigint>;
30
23
  /**
31
24
  * @summary increments the sequence
32
25
  * @description Sequence specific implementation
@@ -37,11 +30,19 @@ export declare class CouchDBSequence extends Sequence {
37
30
  */
38
31
  private increment;
39
32
  /**
40
- * @summary Generates the next value in th sequence
41
- * @description calls {@link Sequence#parse} on the current value
42
- * followed by {@link Sequence#increment}
43
- *
33
+ * @description Gets the next value in the sequence
34
+ * @summary Retrieves the current value of the sequence and increments it by the
35
+ * configured increment amount. This is the main method used to get a new sequential value.
36
+ * @return A promise that resolves to the next value in the sequence
37
+ */
38
+ next(...argz: MaybeContextualArg<any>): Promise<number | string | bigint>;
39
+ /**
40
+ * @description Generates a range of sequential values
41
+ * @summary Retrieves a specified number of sequential values from the sequence.
42
+ * This is useful when you need to allocate multiple IDs at once.
43
+ * The method increments the sequence by the total amount needed and returns all values in the range.
44
+ * @param {number} count - The number of sequential values to generate
45
+ * @return A promise that resolves to an array of sequential values
44
46
  */
45
- next(): Promise<number | string | bigint>;
46
- range(count: number): Promise<(number | string | bigint)[]>;
47
+ range(count: number, ...argz: MaybeContextualArg<any>): Promise<(number | string | bigint)[]>;
47
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Sequence.js","sourceRoot":"","sources":["../../src/sequences/Sequence.ts"],"names":[],"mappings":";;;AAAA,oEAA2D;AAC3D,2DAAuE;AACvE,yCAAsE;AACtE,yCAA0C;AAI1C;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,eAAQ;IAG3C,YACE,OAAwB,EACxB,OAAgD;QAEhD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAU,CAAC,QAAQ,CAAC,0BAAG,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IA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,MAAM,EACpB,0BAAG,EACH,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,CAAC;QACF,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAW,CAAC;QACxD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,IAAI,CAAC,OAAO,CAAC,WAAqB,CACzB,CAAC;QACZ,MAAM,IAAI,GAA6B,MAAM,IAAI,CAAC,SAAS,CACzD,OAAO,EACN,IAAI,CAAC,KAAK,CAAC,KAAK,CAAY,GAAG,WAAW,EAC3C,OAAO,CACR,CAAC;QACF,MAAM,KAAK,GAAiC,EAAE,CAAC;QAC/C,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,WAAW,GAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAY,CAAC,CAAC;QAChE,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ;YACpE,MAAM,IAAI,6BAAa,CAAC,yBAAyB,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAlJD,0CAkJC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-couchdb",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "template for ts projects",
5
5
  "type": "module",
6
6
  "exports": {
@@ -92,7 +92,6 @@
92
92
  "@decaf-ts/decorator-validation": "latest",
93
93
  "@decaf-ts/injectable-decorators": "latest",
94
94
  "@decaf-ts/logging": "latest",
95
- "@decaf-ts/reflection": "latest",
96
95
  "@decaf-ts/transactional-decorators": "latest"
97
96
  }
98
97
  }
@@ -1,16 +0,0 @@
1
- import { Repository } from "@decaf-ts/core";
2
- import { CouchDBAdapter } from "../adapter";
3
- import { Model } from "@decaf-ts/decorator-validation";
4
- import { MangoQuery } from "../types";
5
- import { Context, RepositoryFlags } from "@decaf-ts/db-decorators";
6
- /**
7
- * @description Repository type for CouchDB operations
8
- * @summary Type definition for a repository that works with CouchDB through the CouchDBAdapter
9
- * @template M - The model type that extends Model
10
- * @template Y - The scope type
11
- * @template F - The repository flags type
12
- * @template C - The context type that extends Context<F>
13
- * @typedef {Repository<M, MangoQuery, CouchDBAdapter<Y, F, C>>} CouchDBRepository
14
- * @memberOf module:for-couchdb
15
- */
16
- export type CouchDBRepository<M extends Model, Y, CONN, F extends RepositoryFlags, C extends Context<F>> = Repository<M, MangoQuery, CouchDBAdapter<Y, CONN, F, C>>;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=CouchDBRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CouchDBRepository.js","sourceRoot":"","sources":["../../../src/interfaces/CouchDBRepository.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export * from "./CouchDBRepository";
@@ -1,2 +0,0 @@
1
- export * from "./CouchDBRepository.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,uCAAoC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=CouchDBRepository.js.map
@@ -1,16 +0,0 @@
1
- import { Repository } from "@decaf-ts/core";
2
- import { CouchDBAdapter } from "../adapter";
3
- import { Model } from "@decaf-ts/decorator-validation";
4
- import { MangoQuery } from "../types";
5
- import { Context, RepositoryFlags } from "@decaf-ts/db-decorators";
6
- /**
7
- * @description Repository type for CouchDB operations
8
- * @summary Type definition for a repository that works with CouchDB through the CouchDBAdapter
9
- * @template M - The model type that extends Model
10
- * @template Y - The scope type
11
- * @template F - The repository flags type
12
- * @template C - The context type that extends Context<F>
13
- * @typedef {Repository<M, MangoQuery, CouchDBAdapter<Y, F, C>>} CouchDBRepository
14
- * @memberOf module:for-couchdb
15
- */
16
- export type CouchDBRepository<M extends Model, Y, CONN, F extends RepositoryFlags, C extends Context<F>> = Repository<M, MangoQuery, CouchDBAdapter<Y, CONN, F, C>>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"CouchDBRepository.js","sourceRoot":"","sources":["../../src/interfaces/CouchDBRepository.ts"],"names":[],"mappings":""}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./CouchDBRepository.cjs"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- export * from "./CouchDBRepository";
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAoC"}