feat: добавил Entity Manager
This commit is contained in:
1 parent
3b6e00ec1d
commit
d0942e59d9
3 files changed
+79
No files matched your search
@@ -26,6 +26,20 @@ export declare abstract class Entity<T extends Data> {
|
||||
/** @public */
|
||||
export declare type EntityConstructor<T extends Data> = new (data?: T) => Entity<T>;
|
||||
|
||||
/** @public */
|
||||
export declare class EntityManager {
|
||||
private readonly _storage;
|
||||
private _saveMap;
|
||||
private _removeMap;
|
||||
constructor(storage: Storage_2);
|
||||
persist(entity: Entity<any>): this;
|
||||
persistMany(entities: Entity<any>[]): this;
|
||||
remove(entity: Entity<any>): this;
|
||||
forget(): this;
|
||||
flush(): Promise<this>;
|
||||
refresh(entity: Entity<any>): Promise<Entity<any>>;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare class ErrEntityHasNoUniqKeyValue extends Error {
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user