@rolster/vinegar 2.2.0 → 2.2.1
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/esm/datasource.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbstractProcedure } from './procedure';
|
|
2
|
-
import { AbstractModel, DirtyModel, ModelHideable,
|
|
2
|
+
import { AbstractModel, DirtyModel, ModelHideable, Transaction } from './types';
|
|
3
3
|
export declare abstract class AbstractEntityDataSource {
|
|
4
4
|
abstract insert(model: AbstractModel): Promise<void>;
|
|
5
|
-
abstract refresh(
|
|
6
|
-
abstract update(model: AbstractModel, dirty
|
|
5
|
+
abstract refresh(transaction: Transaction): Promise<void>;
|
|
6
|
+
abstract update(model: AbstractModel, dirty: DirtyModel): Promise<void>;
|
|
7
7
|
abstract delete(model: AbstractModel): Promise<void>;
|
|
8
8
|
abstract hidden(model: ModelHideable): Promise<void>;
|
|
9
9
|
abstract procedure(procedure: AbstractProcedure): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.js","sourceRoot":"","sources":["../../src/datasource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datasource.js","sourceRoot":"","sources":["../../src/datasource.ts"],"names":[],"mappings":"AAGA,MAAM,OAAgB,wBAAwB;CAY7C"}
|
package/dist/esm/entity.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractEntity, AbstractModel, DirtyModel, QueryEntityManager,
|
|
1
|
+
import { AbstractEntity, AbstractModel, DirtyModel, QueryEntityManager, Transaction } from './types';
|
|
2
2
|
export declare class Entity implements AbstractEntity {
|
|
3
3
|
readonly uuid: string;
|
|
4
4
|
constructor(uuid: string);
|
|
@@ -9,7 +9,7 @@ export declare abstract class EntityLink<E extends AbstractEntity, M extends Abs
|
|
|
9
9
|
constructor(entity: E, relationable?: boolean);
|
|
10
10
|
abstract create(manager: QueryEntityManager): M | Promise<M>;
|
|
11
11
|
}
|
|
12
|
-
export declare abstract class EntityRefresh<E extends AbstractEntity, M extends AbstractModel> implements
|
|
12
|
+
export declare abstract class EntityRefresh<E extends AbstractEntity, M extends AbstractModel> implements Transaction {
|
|
13
13
|
readonly entity: E;
|
|
14
14
|
readonly model: M;
|
|
15
15
|
readonly relationable: boolean;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface Model extends ModelHideable {
|
|
|
16
16
|
export interface AbstractEntity {
|
|
17
17
|
readonly uuid: string;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface Transaction {
|
|
20
20
|
execute(): Promise<void>;
|
|
21
21
|
}
|
|
22
22
|
export interface QueryEntityManager {
|