breeze-sequelize
Version:
Breeze Sequelize server implementation
18 lines (17 loc) • 981 B
TypeScript
import { StructuralType } from "breeze-client";
import { SequelizeSaveHandler, ServerEntityError, ServerEntityInfo, ServerEntityState } from "./SequelizeSaveHandler";
/** Maps EntityType names to arrays of EntityInfo */
export declare class SaveMap {
private sequelizeSaveHandler;
entityErrors: ServerEntityError[];
errorMessage: string;
constructor(sequelizeSaveHandler: SequelizeSaveHandler);
getEntityType(entityTypeName: string): StructuralType;
getEntityInfosOfType(entityTypeName: string): ServerEntityInfo[];
/** Add an entity to the map */
addEntity(entityTypeName: string, entity: object, entityState?: ServerEntityState): ServerEntityInfo;
/** Add an error to the entityErrors collection */
addEntityError(entityInfo: ServerEntityInfo, errorName: string, errorMessage: string, propertyName: string): void;
/** Set the error message to return to the client */
setErrorMessage(errorMessage: string): void;
}