@decaf-ts/core 0.3.37 → 0.3.38
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/LICENSE.md +0 -0
- package/README.md +37 -243
- package/dist/core.js +2 -0
- package/dist/{core.bundle.min.js.LICENSE.txt → core.js.LICENSE.txt} +0 -0
- package/dist/esm/core.js +2 -0
- package/dist/esm/{core.bundle.min.esm.js.LICENSE.txt → core.js.LICENSE.txt} +0 -0
- package/dist/{lib → types}/identity/decorators.d.ts +1 -1
- package/dist/{lib → types}/identity/index.d.ts +0 -0
- package/dist/{lib → types}/identity/utils.d.ts +0 -0
- package/{lib/esm → dist/types}/index.d.ts +1 -1
- package/dist/{lib → types}/interfaces/Builder.d.ts +0 -0
- package/dist/{lib → types}/interfaces/Executor.d.ts +0 -0
- package/dist/{lib → types}/interfaces/Observable.d.ts +0 -0
- package/dist/{lib → types}/interfaces/Observer.d.ts +0 -0
- package/dist/{lib → types}/interfaces/Paginatable.d.ts +0 -0
- package/dist/{lib → types}/interfaces/Queriable.d.ts +0 -0
- package/dist/{lib → types}/interfaces/RawExecutor.d.ts +0 -0
- package/dist/{lib → types}/interfaces/SequenceOptions.d.ts +0 -0
- package/dist/{lib → types}/interfaces/index.d.ts +0 -0
- package/dist/{lib → types}/model/BaseModel.d.ts +0 -0
- package/dist/{lib → types}/model/IdentifiedBaseModel.d.ts +0 -0
- package/dist/{lib → types}/model/User.d.ts +0 -0
- package/{lib → dist/types}/model/construction.d.ts +1 -1
- package/dist/{lib → types}/model/decorators.d.ts +0 -0
- package/dist/{lib → types}/model/index.d.ts +0 -0
- package/dist/{lib → types}/model/types.d.ts +0 -0
- package/dist/{lib → types}/persistence/Adapter.d.ts +0 -0
- package/dist/{lib → types}/persistence/Sequence.d.ts +0 -0
- package/dist/{lib → types}/persistence/constants.d.ts +0 -0
- package/dist/{lib → types}/persistence/decorators.d.ts +0 -0
- package/dist/{lib → types}/persistence/errors.d.ts +0 -0
- package/dist/{lib → types}/persistence/index.d.ts +0 -0
- package/dist/{lib → types}/query/Clause.d.ts +0 -0
- package/dist/{lib → types}/query/ClauseFactory.d.ts +0 -0
- package/dist/{lib → types}/query/Condition.d.ts +0 -0
- package/dist/{lib → types}/query/Paginator.d.ts +0 -0
- package/dist/{lib → types}/query/Query.d.ts +0 -0
- package/dist/{lib → types}/query/Statement.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/FromClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/GroupByClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/InsertClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/LimitClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/OffsetClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/OrderByClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/SelectClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/SelectorBasedClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/ValuesClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/WhereClause.d.ts +0 -0
- package/dist/{lib → types}/query/clauses/index.d.ts +0 -0
- package/dist/{lib → types}/query/constants.d.ts +0 -0
- package/dist/{lib → types}/query/errors.d.ts +0 -0
- package/dist/{lib → types}/query/index.d.ts +0 -0
- package/dist/{lib → types}/query/options.d.ts +0 -0
- package/dist/{lib → types}/query/selectors.d.ts +0 -0
- package/dist/{lib → types}/query/types.d.ts +0 -0
- package/dist/{lib → types}/repository/Context.d.ts +0 -0
- package/dist/{lib → types}/repository/Repository.d.ts +0 -0
- package/dist/{lib → types}/repository/constants.d.ts +0 -0
- package/dist/{lib → types}/repository/decorators.d.ts +0 -0
- package/dist/{lib → types}/repository/errors.d.ts +0 -0
- package/dist/{lib → types}/repository/index.d.ts +0 -0
- package/dist/{lib → types}/repository/injectables.d.ts +0 -0
- package/dist/{lib → types}/repository/types.d.ts +0 -0
- package/dist/{lib → types}/repository/utils.d.ts +0 -0
- package/dist/{lib → types}/validators/ClauseSequenceValidator.d.ts +3 -3
- package/dist/{lib → types}/validators/decorators.d.ts +0 -0
- package/dist/{lib → types}/validators/index.d.ts +0 -0
- package/lib/esm/identity/decorators.js +1 -1
- package/lib/esm/identity/index.js +1 -1
- package/lib/esm/identity/utils.js +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/interfaces/Builder.js +1 -1
- package/lib/esm/interfaces/Executor.js +1 -1
- package/lib/esm/interfaces/Observable.js +1 -1
- package/lib/esm/interfaces/Observer.js +1 -1
- package/lib/esm/interfaces/Paginatable.js +1 -1
- package/lib/esm/interfaces/Queriable.js +1 -1
- package/lib/esm/interfaces/RawExecutor.js +1 -1
- package/lib/esm/interfaces/SequenceOptions.js +1 -1
- package/lib/esm/interfaces/index.js +1 -1
- package/lib/esm/model/BaseModel.js +1 -1
- package/lib/esm/model/IdentifiedBaseModel.js +1 -1
- package/lib/esm/model/User.js +1 -1
- package/lib/esm/model/construction.js +1 -1
- package/lib/esm/model/decorators.js +1 -1
- package/lib/esm/model/index.js +1 -1
- package/lib/esm/model/types.js +1 -1
- package/lib/esm/persistence/Adapter.js +1 -1
- package/lib/esm/persistence/Sequence.js +1 -1
- package/lib/esm/persistence/constants.js +1 -1
- package/lib/esm/persistence/decorators.js +1 -1
- package/lib/esm/persistence/errors.js +1 -1
- package/lib/esm/persistence/index.js +1 -1
- package/lib/esm/query/Clause.js +1 -1
- package/lib/esm/query/ClauseFactory.js +1 -1
- package/lib/esm/query/Condition.js +1 -1
- package/lib/esm/query/Paginator.js +1 -1
- package/lib/esm/query/Query.js +1 -1
- package/lib/esm/query/Statement.js +1 -1
- package/lib/esm/query/clauses/FromClause.js +1 -1
- package/lib/esm/query/clauses/GroupByClause.js +1 -1
- package/lib/esm/query/clauses/InsertClause.js +1 -1
- package/lib/esm/query/clauses/LimitClause.js +1 -1
- package/lib/esm/query/clauses/OffsetClause.js +1 -1
- package/lib/esm/query/clauses/OrderByClause.js +1 -1
- package/lib/esm/query/clauses/SelectClause.js +1 -1
- package/lib/esm/query/clauses/SelectorBasedClause.js +1 -1
- package/lib/esm/query/clauses/ValuesClause.js +1 -1
- package/lib/esm/query/clauses/WhereClause.js +72 -0
- package/lib/esm/query/clauses/index.js +12 -0
- package/lib/esm/query/constants.js +1 -1
- package/lib/esm/query/errors.js +1 -1
- package/lib/esm/query/index.js +1 -1
- package/lib/esm/query/options.js +1 -1
- package/lib/esm/query/selectors.js +1 -1
- package/lib/esm/query/types.js +1 -1
- package/lib/esm/repository/Context.js +1 -1
- package/lib/esm/repository/Repository.js +1 -1
- package/lib/esm/repository/constants.js +1 -1
- package/lib/esm/repository/decorators.js +1 -1
- package/lib/esm/repository/errors.js +1 -1
- package/lib/esm/repository/index.js +1 -1
- package/lib/esm/repository/injectables.js +1 -1
- package/lib/esm/repository/types.js +1 -1
- package/lib/esm/repository/utils.js +1 -1
- package/lib/esm/validators/ClauseSequenceValidator.js +8 -8
- package/lib/esm/validators/decorators.js +1 -1
- package/lib/esm/validators/index.js +1 -1
- package/lib/identity/decorators.cjs +2 -0
- package/lib/identity/index.cjs +2 -0
- package/lib/identity/utils.cjs +2 -0
- package/lib/index.cjs +3 -1
- package/lib/interfaces/Builder.cjs +2 -0
- package/lib/interfaces/Executor.cjs +2 -0
- package/lib/interfaces/Observable.cjs +2 -0
- package/lib/interfaces/Observer.cjs +2 -0
- package/lib/interfaces/Paginatable.cjs +2 -0
- package/lib/interfaces/Queriable.cjs +2 -0
- package/lib/interfaces/RawExecutor.cjs +2 -0
- package/lib/interfaces/SequenceOptions.cjs +2 -0
- package/lib/interfaces/index.cjs +2 -0
- package/lib/model/BaseModel.cjs +2 -0
- package/lib/model/IdentifiedBaseModel.cjs +2 -0
- package/lib/model/User.cjs +2 -0
- package/lib/model/construction.cjs +2 -0
- package/lib/model/decorators.cjs +2 -0
- package/lib/model/index.cjs +2 -0
- package/lib/model/types.cjs +2 -0
- package/lib/persistence/Adapter.cjs +2 -0
- package/lib/persistence/Sequence.cjs +2 -0
- package/lib/persistence/constants.cjs +2 -0
- package/lib/persistence/decorators.cjs +2 -0
- package/lib/persistence/errors.cjs +2 -0
- package/lib/persistence/index.cjs +2 -0
- package/lib/query/Clause.cjs +2 -0
- package/lib/query/ClauseFactory.cjs +2 -0
- package/lib/query/Condition.cjs +2 -0
- package/lib/query/Paginator.cjs +2 -0
- package/lib/query/Query.cjs +2 -0
- package/lib/query/Statement.cjs +2 -0
- package/lib/query/clauses/FromClause.cjs +2 -0
- package/lib/query/clauses/GroupByClause.cjs +2 -0
- package/lib/query/clauses/InsertClause.cjs +2 -0
- package/lib/query/clauses/LimitClause.cjs +2 -0
- package/lib/query/clauses/OffsetClause.cjs +2 -0
- package/lib/query/clauses/OrderByClause.cjs +2 -0
- package/lib/query/clauses/SelectClause.cjs +2 -0
- package/lib/query/clauses/SelectorBasedClause.cjs +2 -0
- package/lib/query/clauses/ValuesClause.cjs +2 -0
- package/lib/query/clauses/WhereClause.cjs +2 -0
- package/lib/query/clauses/index.cjs +2 -0
- package/lib/query/constants.cjs +2 -0
- package/lib/query/errors.cjs +2 -0
- package/lib/query/index.cjs +2 -0
- package/lib/query/options.cjs +2 -0
- package/lib/query/selectors.cjs +2 -0
- package/lib/query/types.cjs +2 -0
- package/lib/repository/Context.cjs +2 -0
- package/lib/repository/Repository.cjs +2 -0
- package/lib/repository/constants.cjs +2 -0
- package/lib/repository/decorators.cjs +2 -0
- package/lib/repository/errors.cjs +2 -0
- package/lib/repository/index.cjs +2 -0
- package/lib/repository/injectables.cjs +2 -0
- package/lib/repository/types.cjs +2 -0
- package/lib/repository/utils.cjs +2 -0
- package/lib/validators/ClauseSequenceValidator.cjs +9 -7
- package/lib/validators/decorators.cjs +2 -0
- package/lib/validators/index.cjs +2 -0
- package/package.json +27 -16
- package/dist/core.bundle.min.js +0 -2
- package/dist/esm/core.bundle.min.esm.js +0 -2
- package/dist/lib/index.d.ts +0 -25
- package/dist/lib/model/construction.d.ts +0 -15
- package/lib/esm/identity/decorators.d.ts +0 -24
- package/lib/esm/identity/index.d.ts +0 -2
- package/lib/esm/identity/utils.d.ts +0 -3
- package/lib/esm/interfaces/Builder.d.ts +0 -16
- package/lib/esm/interfaces/Executor.d.ts +0 -19
- package/lib/esm/interfaces/Observable.d.ts +0 -31
- package/lib/esm/interfaces/Observer.d.ts +0 -16
- package/lib/esm/interfaces/Paginatable.d.ts +0 -4
- package/lib/esm/interfaces/Queriable.d.ts +0 -6
- package/lib/esm/interfaces/RawExecutor.d.ts +0 -20
- package/lib/esm/interfaces/SequenceOptions.d.ts +0 -19
- package/lib/esm/interfaces/index.d.ts +0 -7
- package/lib/esm/model/BaseModel.d.ts +0 -6
- package/lib/esm/model/IdentifiedBaseModel.d.ts +0 -7
- package/lib/esm/model/User.d.ts +0 -8
- package/lib/esm/model/construction.d.ts +0 -15
- package/lib/esm/model/decorators.d.ts +0 -75
- package/lib/esm/model/index.d.ts +0 -4
- package/lib/esm/model/types.d.ts +0 -6
- package/lib/esm/persistence/Adapter.d.ts +0 -86
- package/lib/esm/persistence/Sequence.d.ts +0 -22
- package/lib/esm/persistence/constants.d.ts +0 -22
- package/lib/esm/persistence/decorators.d.ts +0 -1
- package/lib/esm/persistence/errors.d.ts +0 -7
- package/lib/esm/persistence/index.d.ts +0 -5
- package/lib/esm/query/Clause.d.ts +0 -50
- package/lib/esm/query/ClauseFactory.d.ts +0 -71
- package/lib/esm/query/Condition.d.ts +0 -75
- package/lib/esm/query/Paginator.d.ts +0 -22
- package/lib/esm/query/Query.d.ts +0 -43
- package/lib/esm/query/Statement.d.ts +0 -55
- package/lib/esm/query/clauses/FromClause.d.ts +0 -45
- package/lib/esm/query/clauses/GroupByClause.d.ts +0 -21
- package/lib/esm/query/clauses/InsertClause.d.ts +0 -37
- package/lib/esm/query/clauses/LimitClause.d.ts +0 -29
- package/lib/esm/query/clauses/OffsetClause.d.ts +0 -21
- package/lib/esm/query/clauses/OrderByClause.d.ts +0 -37
- package/lib/esm/query/clauses/SelectClause.d.ts +0 -47
- package/lib/esm/query/clauses/SelectorBasedClause.d.ts +0 -25
- package/lib/esm/query/clauses/ValuesClause.d.ts +0 -21
- package/lib/esm/query/clauses/WhereClause.d.ts +0 -46
- package/lib/esm/query/clauses/index.d.ts +0 -10
- package/lib/esm/query/constants.d.ts +0 -79
- package/lib/esm/query/errors.d.ts +0 -7
- package/lib/esm/query/index.d.ts +0 -12
- package/lib/esm/query/options.d.ts +0 -372
- package/lib/esm/query/selectors.d.ts +0 -38
- package/lib/esm/query/types.d.ts +0 -2
- package/lib/esm/repository/Context.d.ts +0 -10
- package/lib/esm/repository/Repository.d.ts +0 -70
- package/lib/esm/repository/constants.d.ts +0 -25
- package/lib/esm/repository/decorators.d.ts +0 -2
- package/lib/esm/repository/errors.d.ts +0 -12
- package/lib/esm/repository/index.d.ts +0 -8
- package/lib/esm/repository/injectables.d.ts +0 -5
- package/lib/esm/repository/types.d.ts +0 -15
- package/lib/esm/repository/utils.d.ts +0 -3
- package/lib/esm/validators/ClauseSequenceValidator.d.ts +0 -28
- package/lib/esm/validators/decorators.d.ts +0 -10
- package/lib/esm/validators/index.d.ts +0 -2
- package/lib/identity/decorators.d.ts +0 -24
- package/lib/identity/index.d.ts +0 -2
- package/lib/identity/utils.d.ts +0 -3
- package/lib/index.d.ts +0 -25
- package/lib/interfaces/Builder.d.ts +0 -16
- package/lib/interfaces/Executor.d.ts +0 -19
- package/lib/interfaces/Observable.d.ts +0 -31
- package/lib/interfaces/Observer.d.ts +0 -16
- package/lib/interfaces/Paginatable.d.ts +0 -4
- package/lib/interfaces/Queriable.d.ts +0 -6
- package/lib/interfaces/RawExecutor.d.ts +0 -20
- package/lib/interfaces/SequenceOptions.d.ts +0 -19
- package/lib/interfaces/index.d.ts +0 -7
- package/lib/model/BaseModel.d.ts +0 -6
- package/lib/model/IdentifiedBaseModel.d.ts +0 -7
- package/lib/model/User.d.ts +0 -8
- package/lib/model/decorators.d.ts +0 -75
- package/lib/model/index.d.ts +0 -4
- package/lib/model/types.d.ts +0 -6
- package/lib/persistence/Adapter.d.ts +0 -86
- package/lib/persistence/Sequence.d.ts +0 -22
- package/lib/persistence/constants.d.ts +0 -22
- package/lib/persistence/decorators.d.ts +0 -1
- package/lib/persistence/errors.d.ts +0 -7
- package/lib/persistence/index.d.ts +0 -5
- package/lib/query/Clause.d.ts +0 -50
- package/lib/query/ClauseFactory.d.ts +0 -71
- package/lib/query/Condition.d.ts +0 -75
- package/lib/query/Paginator.d.ts +0 -22
- package/lib/query/Query.d.ts +0 -43
- package/lib/query/Statement.d.ts +0 -55
- package/lib/query/clauses/FromClause.d.ts +0 -45
- package/lib/query/clauses/GroupByClause.d.ts +0 -21
- package/lib/query/clauses/InsertClause.d.ts +0 -37
- package/lib/query/clauses/LimitClause.d.ts +0 -29
- package/lib/query/clauses/OffsetClause.d.ts +0 -21
- package/lib/query/clauses/OrderByClause.d.ts +0 -37
- package/lib/query/clauses/SelectClause.d.ts +0 -47
- package/lib/query/clauses/SelectorBasedClause.d.ts +0 -25
- package/lib/query/clauses/ValuesClause.d.ts +0 -21
- package/lib/query/clauses/WhereClause.d.ts +0 -46
- package/lib/query/clauses/index.d.ts +0 -10
- package/lib/query/constants.d.ts +0 -79
- package/lib/query/errors.d.ts +0 -7
- package/lib/query/index.d.ts +0 -12
- package/lib/query/options.d.ts +0 -372
- package/lib/query/selectors.d.ts +0 -38
- package/lib/query/types.d.ts +0 -2
- package/lib/repository/Context.d.ts +0 -10
- package/lib/repository/Repository.d.ts +0 -70
- package/lib/repository/constants.d.ts +0 -25
- package/lib/repository/decorators.d.ts +0 -2
- package/lib/repository/errors.d.ts +0 -12
- package/lib/repository/index.d.ts +0 -8
- package/lib/repository/injectables.d.ts +0 -5
- package/lib/repository/types.d.ts +0 -15
- package/lib/repository/utils.d.ts +0 -3
- package/lib/validators/ClauseSequenceValidator.d.ts +0 -28
- package/lib/validators/decorators.d.ts +0 -10
- package/lib/validators/index.d.ts +0 -2
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @summary Standard Builder APi for the Builder design pattern
|
3
|
-
* @description Expose the build method
|
4
|
-
*
|
5
|
-
* @interface Builder
|
6
|
-
*
|
7
|
-
* @category Construction
|
8
|
-
*/
|
9
|
-
export interface Builder<T> {
|
10
|
-
/**
|
11
|
-
* @summary Build the Object
|
12
|
-
*
|
13
|
-
* @method
|
14
|
-
*/
|
15
|
-
build(...args: any[]): T;
|
16
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @summary processes query objects
|
3
|
-
*
|
4
|
-
* @typedef V the output
|
5
|
-
*
|
6
|
-
* @interface Executor
|
7
|
-
*
|
8
|
-
* @category Query
|
9
|
-
*/
|
10
|
-
export interface Executor {
|
11
|
-
/**
|
12
|
-
* @summary Processes itself
|
13
|
-
*
|
14
|
-
* @param {any[]} args
|
15
|
-
*
|
16
|
-
* @method
|
17
|
-
*/
|
18
|
-
execute<V>(...args: any): Promise<V>;
|
19
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { Observer } from "./Observer";
|
2
|
-
/**
|
3
|
-
* @summary Observable Api
|
4
|
-
* @description manage and update {@link Observer}s
|
5
|
-
*
|
6
|
-
* @interface Observable
|
7
|
-
*
|
8
|
-
* @category Observables
|
9
|
-
*/
|
10
|
-
export interface Observable {
|
11
|
-
/**
|
12
|
-
* @summary Register new {@link Observer}s
|
13
|
-
* @param {Observer} observer
|
14
|
-
*
|
15
|
-
* @method
|
16
|
-
*/
|
17
|
-
observe(observer: Observer): void;
|
18
|
-
/**
|
19
|
-
* @summary Unregister new {@link Observer}s
|
20
|
-
* @param {Observer} observer
|
21
|
-
*
|
22
|
-
* @method
|
23
|
-
*/
|
24
|
-
unObserve(observer: Observer): void;
|
25
|
-
/**
|
26
|
-
* @summary have registered {@link Observer}s update themselves
|
27
|
-
* @param {any[]} args
|
28
|
-
* @method
|
29
|
-
*/
|
30
|
-
updateObservers(...args: any[]): Promise<void>;
|
31
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @summary Observer Api
|
3
|
-
* @description will be called by the {@link Observable}
|
4
|
-
*
|
5
|
-
* @interface Observer
|
6
|
-
*
|
7
|
-
* @category Observables
|
8
|
-
*/
|
9
|
-
export interface Observer {
|
10
|
-
/**
|
11
|
-
* @summary Refreshes the Observer
|
12
|
-
* @param {any[]} args
|
13
|
-
* @method
|
14
|
-
*/
|
15
|
-
refresh(...args: any[]): Promise<void>;
|
16
|
-
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { Condition, SelectSelector, WhereOption } from "../query";
|
2
|
-
import { OrderDirection } from "../repository";
|
3
|
-
export interface Queriable {
|
4
|
-
select(selector?: SelectSelector): WhereOption;
|
5
|
-
query<V>(condition: Condition, orderBy: string, order: OrderDirection, limit?: number, skip?: number): Promise<V>;
|
6
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @summary Executes a raw instruction in the Database
|
3
|
-
* @typeDef Q The input type
|
4
|
-
* @typeDef R The result type
|
5
|
-
*
|
6
|
-
* @interface RawExecutor
|
7
|
-
* @category Query
|
8
|
-
*/
|
9
|
-
export interface RawExecutor<Q> {
|
10
|
-
/**
|
11
|
-
* @summary Executes a raw instruction in the Database
|
12
|
-
*
|
13
|
-
* @typeDef V the expected outcome of the instruction
|
14
|
-
* @param rawInput
|
15
|
-
* @param args
|
16
|
-
*
|
17
|
-
* @method
|
18
|
-
*/
|
19
|
-
raw<R>(rawInput: Q, ...args: any[]): Promise<R>;
|
20
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @typedef SequenceOptions
|
3
|
-
*
|
4
|
-
* @prop {string | number} [startingValue] defines the starting value when sequence doest not exist
|
5
|
-
*
|
6
|
-
* @category Sequences
|
7
|
-
*/
|
8
|
-
export interface SequenceOptions {
|
9
|
-
name?: string;
|
10
|
-
type: "Number" | "BigInt" | undefined;
|
11
|
-
startWith: number;
|
12
|
-
incrementBy: number;
|
13
|
-
minValue?: number;
|
14
|
-
maxValue?: number;
|
15
|
-
cycle: boolean;
|
16
|
-
}
|
17
|
-
export declare const DefaultSequenceOptions: SequenceOptions;
|
18
|
-
export declare const NumericSequence: SequenceOptions;
|
19
|
-
export declare const BigIntSequence: SequenceOptions;
|
package/lib/model/BaseModel.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
import { ModelArg } from "@decaf-ts/decorator-validation";
|
2
|
-
import { BaseModel } from "./BaseModel";
|
3
|
-
export declare abstract class IdentifiedBaseModel extends BaseModel {
|
4
|
-
createdBy: string;
|
5
|
-
updatedBy: string;
|
6
|
-
protected constructor(arg?: ModelArg<IdentifiedBaseModel>);
|
7
|
-
}
|
package/lib/model/User.d.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
import { Model, ModelArg } from "@decaf-ts/decorator-validation";
|
2
|
-
import { Roles } from "../persistence/constants";
|
3
|
-
export declare class User extends Model {
|
4
|
-
id: string;
|
5
|
-
roles?: (string | Roles)[];
|
6
|
-
affiliations?: string[];
|
7
|
-
constructor(arg?: ModelArg<User>);
|
8
|
-
}
|
@@ -1,75 +0,0 @@
|
|
1
|
-
import { CascadeMetadata } from "../repository/types";
|
2
|
-
import { OrderDirection } from "../repository/constants";
|
3
|
-
import { Constructor, Model } from "@decaf-ts/decorator-validation";
|
4
|
-
import { Repo } from "../repository/Repository";
|
5
|
-
import { Context } from "../repository/Context";
|
6
|
-
export declare function table(tableName: string): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
7
|
-
export declare function column(columnName: string): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
8
|
-
/**
|
9
|
-
* @summary Index Decorator
|
10
|
-
* @description properties decorated will the index in the
|
11
|
-
* DB for performance in queries
|
12
|
-
*
|
13
|
-
* @param {OrderDirection[]} [directions]
|
14
|
-
* @param {string[]} [compositions]
|
15
|
-
*
|
16
|
-
* @function index
|
17
|
-
*/
|
18
|
-
export declare function index(directions?: OrderDirection[], compositions?: string[]): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
19
|
-
export declare function uniqueOnCreateUpdate<M extends Model, R extends Repo<M>, Y = any>(this: R, context: Context<M>, data: Y, key: string, model: M): Promise<void>;
|
20
|
-
/**
|
21
|
-
* @summary Unique Decorator
|
22
|
-
* @description Tags a property as unique.
|
23
|
-
* No other elements in that table can have the same property value
|
24
|
-
*
|
25
|
-
* @function unique
|
26
|
-
*
|
27
|
-
* @memberOf module:wallet-db.Decorators
|
28
|
-
*/
|
29
|
-
export declare function unique(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
30
|
-
export declare function createdByOnCreateUpdate<M extends Model, R extends Repo<M>, Y = any>(this: R, context: Context<M>, data: Y, key: string, model: M): Promise<void>;
|
31
|
-
export declare function createdBy(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
32
|
-
export declare function updatedBy(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
33
|
-
/**
|
34
|
-
* @summary One To One relation Decorators
|
35
|
-
*
|
36
|
-
* @param {Constructor<any>} clazz the {@link Sequence} to use. Defaults to {@link NoneSequence}
|
37
|
-
* @param {CascadeMetadata} [cascadeOptions]
|
38
|
-
* @param {boolean} populate If true, replaces the specified key in the document with the corresponding record from the database
|
39
|
-
*
|
40
|
-
* @function onToOne
|
41
|
-
*
|
42
|
-
* @memberOf module:wallet-db.Decorators
|
43
|
-
*
|
44
|
-
* @see oneToMany
|
45
|
-
* @see manyToOne
|
46
|
-
*/
|
47
|
-
export declare function oneToOne<M extends Model>(clazz: Constructor<M>, cascadeOptions?: CascadeMetadata, populate?: boolean): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
48
|
-
/**
|
49
|
-
* @summary One To Many relation Decorators
|
50
|
-
*
|
51
|
-
* @param {Constructor<any>} clazz the {@link Sequence} to use. Defaults to {@link NoneSequence}
|
52
|
-
* @param {CascadeMetadata} [cascadeOptions]
|
53
|
-
*
|
54
|
-
* @function oneToMany
|
55
|
-
*
|
56
|
-
* @memberOf module:wallet-db.Decorators
|
57
|
-
*
|
58
|
-
* @see oneToOne
|
59
|
-
* @see manyToOne
|
60
|
-
*/
|
61
|
-
export declare function oneToMany<M extends Model>(clazz: Constructor<M>, cascadeOptions?: CascadeMetadata, populate?: boolean): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
62
|
-
/**
|
63
|
-
* @summary Many To One relation Decorators
|
64
|
-
*
|
65
|
-
* @param {Constructor<any>} clazz the {@link Sequence} to use. Defaults to {@link NoneSequence}
|
66
|
-
* @param {CascadeMetadata} [cascadeOptions]
|
67
|
-
*
|
68
|
-
* @function manyToOne
|
69
|
-
*
|
70
|
-
* @memberOf module:wallet-db.Decorators
|
71
|
-
*
|
72
|
-
* @see oneToMany
|
73
|
-
* @see oneToOne
|
74
|
-
*/
|
75
|
-
export declare function manyToOne(clazz: Constructor<any>, cascadeOptions?: CascadeMetadata, populate?: boolean): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
package/lib/model/index.d.ts
DELETED
package/lib/model/types.d.ts
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
import { BaseError, Context, OperationKeys } from "@decaf-ts/db-decorators";
|
2
|
-
import { Observer } from "../interfaces/Observer";
|
3
|
-
import { Constructor, Model, ModelConstructor } from "@decaf-ts/decorator-validation";
|
4
|
-
import { SequenceOptions } from "../interfaces/SequenceOptions";
|
5
|
-
import { RawExecutor } from "../interfaces/RawExecutor";
|
6
|
-
import { Observable } from "../interfaces/Observable";
|
7
|
-
import { Query } from "../query/Query";
|
8
|
-
import { Statement } from "../query/Statement";
|
9
|
-
import { ClauseFactory } from "../query/ClauseFactory";
|
10
|
-
import { Condition } from "../query/Condition";
|
11
|
-
import { Repository } from "../repository/Repository";
|
12
|
-
import { Sequence } from "./Sequence";
|
13
|
-
import { User } from "../model/User";
|
14
|
-
/**
|
15
|
-
* @summary Abstract Decaf-ts Persistence Adapter Class
|
16
|
-
* @description Offers the base implementation for all Adapter Classes
|
17
|
-
* and manages them various registered {@link Adapter}s
|
18
|
-
*
|
19
|
-
* @typedef Y the underlying persistence object type
|
20
|
-
* @typedef Q The query object the adapter uses
|
21
|
-
*
|
22
|
-
* @param {Y} native the underlying persistence object
|
23
|
-
* @param {string} flavour the under witch the persistence adapter should be stored
|
24
|
-
*
|
25
|
-
* @class Adapter
|
26
|
-
* @implements RawExecutor
|
27
|
-
* @implements Observable
|
28
|
-
*/
|
29
|
-
export declare abstract class Adapter<Y, Q> implements RawExecutor<Q>, Observable {
|
30
|
-
readonly flavour: string;
|
31
|
-
private static _current;
|
32
|
-
private static _cache;
|
33
|
-
protected readonly _observers: Observer[];
|
34
|
-
private readonly _native;
|
35
|
-
get native(): Y;
|
36
|
-
repository<M extends Model>(): Constructor<Repository<M, Q, Adapter<Y, Q>>>;
|
37
|
-
protected constructor(native: Y, flavour: string);
|
38
|
-
Query<M extends Model>(): Query<Q, M>;
|
39
|
-
abstract parseCondition(condition: Condition): Q;
|
40
|
-
abstract get Statement(): Statement<Q>;
|
41
|
-
abstract get Clauses(): ClauseFactory<Y, Q>;
|
42
|
-
protected isReserved(attr: string): boolean;
|
43
|
-
protected abstract parseError(err: Error): BaseError;
|
44
|
-
abstract initialize(...args: any[]): Promise<void>;
|
45
|
-
abstract Sequence(options: SequenceOptions): Promise<Sequence>;
|
46
|
-
protected abstract user(): Promise<User | undefined>;
|
47
|
-
context<M extends Model, C extends Context<M>>(operation: OperationKeys.CREATE | OperationKeys.READ | OperationKeys.UPDATE | OperationKeys.DELETE, model: Constructor<M>): Promise<C>;
|
48
|
-
prepare<M extends Model>(model: M, pk: string | number): {
|
49
|
-
record: Record<string, any>;
|
50
|
-
id: string;
|
51
|
-
};
|
52
|
-
revert<M extends Model>(obj: Record<string, any>, clazz: string | Constructor<M>, pk: string, id: string | number | bigint): M;
|
53
|
-
abstract create(tableName: string, id: string | number, model: Record<string, any>, ...args: any[]): Promise<Record<string, any>>;
|
54
|
-
createAll(tableName: string, id: (string | number)[], model: Record<string, any>[], ...args: any[]): Promise<Record<string, any>[]>;
|
55
|
-
abstract read(tableName: string, id: string | number | bigint, ...args: any[]): Promise<Record<string, any>>;
|
56
|
-
readAll(tableName: string, id: (string | number | bigint)[], ...args: any[]): Promise<Record<string, any>[]>;
|
57
|
-
abstract update(tableName: string, id: string | number, model: Record<string, any>, ...args: any[]): Promise<Record<string, any>>;
|
58
|
-
updateAll(tableName: string, id: string[] | number[], model: Record<string, any>[], ...args: any[]): Promise<Record<string, any>[]>;
|
59
|
-
abstract delete(tableName: string, id: string | number | bigint, ...args: any[]): Promise<Record<string, any>>;
|
60
|
-
deleteAll(tableName: string, id: (string | number | bigint)[], ...args: any[]): Promise<Record<string, any>[]>;
|
61
|
-
abstract raw<R>(rawInput: Q, process: boolean, ...args: any[]): Promise<R>;
|
62
|
-
/**
|
63
|
-
* @summary Registers an {@link Observer}
|
64
|
-
* @param {Observer} observer
|
65
|
-
*
|
66
|
-
* @see {Observable#observe}
|
67
|
-
*/
|
68
|
-
observe(observer: Observer): void;
|
69
|
-
/**
|
70
|
-
* @summary Unregisters an {@link Observer}
|
71
|
-
* @param {Observer} observer
|
72
|
-
*
|
73
|
-
* @see {Observable#unObserve}
|
74
|
-
*/
|
75
|
-
unObserve(observer: Observer): void;
|
76
|
-
/**
|
77
|
-
* @summary calls all registered {@link Observer}s to update themselves
|
78
|
-
* @param {any[]} [args] optional arguments to be passed to the {@link Observer#refresh} method
|
79
|
-
*/
|
80
|
-
updateObservers(...args: any[]): Promise<void>;
|
81
|
-
static get current(): Adapter<any, any>;
|
82
|
-
static get<Y, Q>(flavour: any): Adapter<Y, Q> | undefined;
|
83
|
-
static setCurrent(flavour: string): void;
|
84
|
-
static key(key: string): string;
|
85
|
-
static models<M extends Model>(flavour: string): ModelConstructor<any>[];
|
86
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @summary Sequence
|
3
|
-
*
|
4
|
-
* @interface Sequence
|
5
|
-
*
|
6
|
-
* @category Sequences
|
7
|
-
*/
|
8
|
-
import { Constructor, Model } from "@decaf-ts/decorator-validation";
|
9
|
-
import { SequenceOptions } from "../interfaces/SequenceOptions";
|
10
|
-
export declare abstract class Sequence {
|
11
|
-
protected readonly options: SequenceOptions;
|
12
|
-
protected constructor(options: SequenceOptions);
|
13
|
-
/**
|
14
|
-
* @summary generates the next value in the sequence
|
15
|
-
*
|
16
|
-
* @method
|
17
|
-
*/
|
18
|
-
abstract next(): Promise<string | number | bigint>;
|
19
|
-
abstract current(): Promise<string | number | bigint>;
|
20
|
-
abstract range(count: number): Promise<(number | string | bigint)[]>;
|
21
|
-
static pk<M extends Model>(model: M | Constructor<M>): string;
|
22
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
export declare enum PersistenceKeys {
|
2
|
-
INDEX = "index",
|
3
|
-
UNIQUE = "unique",
|
4
|
-
ADAPTER = "adapter",
|
5
|
-
INJECTABLE = "decaf_{0}_adapter_for_{1}",
|
6
|
-
TABLE = "table",
|
7
|
-
COLUMN = "column",
|
8
|
-
METADATA = "__metadata",
|
9
|
-
RELATIONS = "__relations",
|
10
|
-
CLAUSE_SEQUENCE = "clause-sequence",
|
11
|
-
CREATED_BY = "ownership.created-by",
|
12
|
-
UPDATED_BY = "ownership.updated-by",
|
13
|
-
ONE_TO_ONE = "relations.one-to-one",
|
14
|
-
ONE_TO_MANY = "relations.one-to-many",
|
15
|
-
MANY_TO_ONE = "relations.many-to-one",
|
16
|
-
POPULATE = "populate"
|
17
|
-
}
|
18
|
-
export declare enum Roles {
|
19
|
-
ADMIN = "admin",
|
20
|
-
WRITER = "writer",
|
21
|
-
READER = "reader"
|
22
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function uses(flavour: string): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
package/lib/query/Clause.d.ts
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
import { Executor } from "../interfaces";
|
2
|
-
import { Model, ModelArg } from "@decaf-ts/decorator-validation";
|
3
|
-
import { QueryBuilder } from "./options";
|
4
|
-
import { Priority } from "./constants";
|
5
|
-
import { Statement } from "./Statement";
|
6
|
-
import { Paginatable } from "../interfaces/Paginatable";
|
7
|
-
import { Paginator } from "./Paginator";
|
8
|
-
/**
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* @summary Clause Class
|
12
|
-
* @description Represents a Clause in a {@link Statement}
|
13
|
-
*
|
14
|
-
* @typedef Q Represents que query object the persistence adapter uses
|
15
|
-
*
|
16
|
-
* @param {ModelArg<Clause<Q>>} [clause]
|
17
|
-
*
|
18
|
-
* @class Clause
|
19
|
-
* @extends Model
|
20
|
-
* @implements Executor
|
21
|
-
* @implements QueryBuilder
|
22
|
-
* @abstract
|
23
|
-
*
|
24
|
-
* @category Query
|
25
|
-
* @subcategory Clauses
|
26
|
-
*/
|
27
|
-
export declare abstract class Clause<Q> extends Model implements Executor, Paginatable, QueryBuilder<Q> {
|
28
|
-
readonly priority: Priority;
|
29
|
-
readonly statement: Statement<Q>;
|
30
|
-
protected constructor(clause?: ModelArg<Clause<Q>>);
|
31
|
-
protected get adapter(): import("..").Adapter<any, Q>;
|
32
|
-
protected get Clauses(): import("./ClauseFactory").ClauseFactory<any, Q>;
|
33
|
-
/**
|
34
|
-
* @summary return the priority of the clause
|
35
|
-
* @see Priority
|
36
|
-
*/
|
37
|
-
getPriority(): number;
|
38
|
-
abstract build(previous: Q): Q;
|
39
|
-
/**
|
40
|
-
* @inheritDoc
|
41
|
-
* @abstract
|
42
|
-
*/
|
43
|
-
execute<R>(): Promise<R>;
|
44
|
-
/**
|
45
|
-
* @inheritDoc
|
46
|
-
* @abstract
|
47
|
-
*/
|
48
|
-
paginate<R>(size: number): Promise<Paginator<R, Q>>;
|
49
|
-
toString(): string;
|
50
|
-
}
|
@@ -1,71 +0,0 @@
|
|
1
|
-
import { FromClause } from "./clauses";
|
2
|
-
import { GroupByClause } from "./clauses/GroupByClause";
|
3
|
-
import { InsertClause } from "./clauses/InsertClause";
|
4
|
-
import { LimitClause } from "./clauses/LimitClause";
|
5
|
-
import { OffsetClause } from "./clauses/OffsetClause";
|
6
|
-
import { OrderByClause } from "./clauses/OrderByClause";
|
7
|
-
import { SelectClause } from "./clauses/SelectClause";
|
8
|
-
import { ValuesClause } from "./clauses/ValuesClause";
|
9
|
-
import { WhereClause } from "./clauses/WhereClause";
|
10
|
-
import { Adapter } from "../persistence";
|
11
|
-
import { Condition } from "./Condition";
|
12
|
-
import { FromSelector, GroupBySelector, LimitSelector, OffsetSelector, OrderBySelector, SelectSelector } from "./selectors";
|
13
|
-
import { Statement } from "./Statement";
|
14
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
15
|
-
export declare abstract class ClauseFactory<Y, Q> {
|
16
|
-
protected adapter: Adapter<Y, Q>;
|
17
|
-
/**
|
18
|
-
* @summary Factory method for {@link FromClause}
|
19
|
-
* @param {Statement} statement
|
20
|
-
* @param {FromSelector} selector
|
21
|
-
*/
|
22
|
-
abstract from<M extends Model>(statement: Statement<Q>, selector: FromSelector<M>): FromClause<Q, M>;
|
23
|
-
/**
|
24
|
-
* @summary Factory method for {@link GroupByClause}
|
25
|
-
* @param {Statement} statement
|
26
|
-
* @param {GroupBySelector} selector
|
27
|
-
*/
|
28
|
-
abstract groupBy(statement: Statement<Q>, selector: GroupBySelector): GroupByClause<Q>;
|
29
|
-
/**
|
30
|
-
* @summary Factory method for {@link InsertClause}
|
31
|
-
* @param {Statement} statement
|
32
|
-
*/
|
33
|
-
abstract insert<M extends Model>(): InsertClause<Q, M>;
|
34
|
-
/**
|
35
|
-
* @summary Factory method for {@link LimitClause}
|
36
|
-
* @param {Statement} statement
|
37
|
-
* @param {LimitSelector} selector
|
38
|
-
*/
|
39
|
-
abstract limit(statement: Statement<Q>, selector: LimitSelector): LimitClause<Q>;
|
40
|
-
/**
|
41
|
-
* @summary Factory method for {@link OffsetClause}
|
42
|
-
* @param {Statement} statement
|
43
|
-
* @param {OffsetSelector} selector
|
44
|
-
*/
|
45
|
-
abstract offset(statement: Statement<Q>, selector: OffsetSelector): OffsetClause<Q>;
|
46
|
-
/**
|
47
|
-
* @summary Factory method for {@link OrderByClause}
|
48
|
-
* @param {Statement} statement
|
49
|
-
* @param {OrderBySelector} selector
|
50
|
-
*/
|
51
|
-
abstract orderBy(statement: Statement<Q>, selector: OrderBySelector[]): OrderByClause<Q>;
|
52
|
-
/**
|
53
|
-
* @summary Factory method for {@link SelectClause}
|
54
|
-
* @param {Statement} statement
|
55
|
-
* @param {SelectSelector} [selector]
|
56
|
-
*/
|
57
|
-
abstract select<M extends Model>(selector?: SelectSelector): SelectClause<Q, M>;
|
58
|
-
/**
|
59
|
-
* @summary Factory method for {@link ValuesClause}
|
60
|
-
* @param {Statement} statement
|
61
|
-
* @param {M[]} values
|
62
|
-
*/
|
63
|
-
abstract values<M extends Model>(statement: Statement<Q>, values: M[]): ValuesClause<Q, M>;
|
64
|
-
/**
|
65
|
-
* @summary Factory method for {@link WhereClause}
|
66
|
-
* @param {Statement} statement
|
67
|
-
* @param {Condition} condition
|
68
|
-
*/
|
69
|
-
abstract where(statement: Statement<Q>, condition: Condition): WhereClause<Q>;
|
70
|
-
protected constructor(adapter: Adapter<Y, Q>);
|
71
|
-
}
|
package/lib/query/Condition.d.ts
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
import { AttributeOption, ConditionBuilderOption } from "./options";
|
2
|
-
import { Model, ModelErrorDefinition } from "@decaf-ts/decorator-validation";
|
3
|
-
import { GroupOperator, Operator } from "./constants";
|
4
|
-
/**
|
5
|
-
* @summary Condition Class
|
6
|
-
* @description Represents a logical condition
|
7
|
-
*
|
8
|
-
* @param {string | Condition} attr1
|
9
|
-
* @param {Operator | GroupOperator} operator
|
10
|
-
* @param {string | Condition} comparison
|
11
|
-
*
|
12
|
-
* @class Condition
|
13
|
-
* @implements Executor
|
14
|
-
*
|
15
|
-
* @category Query
|
16
|
-
* @subcategory Conditions
|
17
|
-
*/
|
18
|
-
export declare class Condition extends Model {
|
19
|
-
protected attr1?: string | Condition;
|
20
|
-
protected operator?: Operator | GroupOperator;
|
21
|
-
protected comparison?: any;
|
22
|
-
private constructor();
|
23
|
-
/**
|
24
|
-
* @summary Joins 2 {@link Condition}s on an {@link Operator#AND} operation
|
25
|
-
* @param {Condition} condition
|
26
|
-
*/
|
27
|
-
and(condition: Condition): Condition;
|
28
|
-
/**
|
29
|
-
* @summary Joins 2 {@link Condition}s on an {@link Operator#OR} operation
|
30
|
-
* @param {Condition} condition
|
31
|
-
*/
|
32
|
-
or(condition: Condition): Condition;
|
33
|
-
/**
|
34
|
-
* @summary excludes a valut from the result
|
35
|
-
* @param val
|
36
|
-
*/
|
37
|
-
not(val: any): Condition;
|
38
|
-
/**
|
39
|
-
* @inheritDoc
|
40
|
-
*/
|
41
|
-
hasErrors(...exceptions: string[]): ModelErrorDefinition | undefined;
|
42
|
-
/**
|
43
|
-
* @summary Joins 2 {@link Condition}s on an {@link Operator#AND} operation
|
44
|
-
* @param {Condition} condition1
|
45
|
-
* @param {Condition} condition2
|
46
|
-
*/
|
47
|
-
static and(condition1: Condition, condition2: Condition): Condition;
|
48
|
-
/**
|
49
|
-
* @summary Joins 2 {@link Condition}s on an {@link Operator#OR} operation
|
50
|
-
* @param {Condition} condition1
|
51
|
-
* @param {Condition} condition2
|
52
|
-
*/
|
53
|
-
static or(condition1: Condition, condition2: Condition): Condition;
|
54
|
-
/**
|
55
|
-
* @summary Groups 2 {@link Condition}s by the specified {@link GroupOperator}
|
56
|
-
* @param {Condition} condition1
|
57
|
-
* @param {GroupOperator} operator
|
58
|
-
* @param {Condition} condition2
|
59
|
-
*/
|
60
|
-
private static group;
|
61
|
-
static attribute(attr: string): AttributeOption;
|
62
|
-
/**
|
63
|
-
* @summary Condition Builder Class
|
64
|
-
* @description provides a simple API to build {@link Condition}s
|
65
|
-
*
|
66
|
-
* @class ConditionBuilder
|
67
|
-
* @implements Builder
|
68
|
-
* @implements AttributeOption
|
69
|
-
*
|
70
|
-
* @category Query
|
71
|
-
* @subcategory Conditions
|
72
|
-
*/
|
73
|
-
private static Builder;
|
74
|
-
static get builder(): ConditionBuilderOption;
|
75
|
-
}
|
package/lib/query/Paginator.d.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { Statement } from "./Statement";
|
2
|
-
export declare abstract class Paginator<V, Q> {
|
3
|
-
protected stat: Statement<Q>;
|
4
|
-
readonly size: number;
|
5
|
-
protected readonly _rawStatement: Q;
|
6
|
-
protected _currentPage: number;
|
7
|
-
protected _totalPages: number;
|
8
|
-
protected _recordCount: number;
|
9
|
-
protected limit: number;
|
10
|
-
private _statement?;
|
11
|
-
get current(): number;
|
12
|
-
get total(): number;
|
13
|
-
get count(): number;
|
14
|
-
get statement(): Q;
|
15
|
-
protected get adapter(): import("..").Adapter<any, Q>;
|
16
|
-
protected constructor(stat: Statement<Q>, size: number, _rawStatement: Q);
|
17
|
-
protected abstract prepare(rawStatement: Q): Q;
|
18
|
-
next(): Promise<V[]>;
|
19
|
-
previous(): Promise<V[]>;
|
20
|
-
protected validatePage(page: number): void;
|
21
|
-
abstract page(page?: number, ...args: any[]): Promise<V[]>;
|
22
|
-
}
|