@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
25 lines • 2.2 kB
TypeScript
import alasql from 'alasql';
export declare const CREATE_TABLE_METADATA_ENTITY = "\n CREATE TABLE Metadata__Entity(\n EntityId UniqueIdentifier PRIMARY KEY, \n LogicalName string, \n EntitySetName string, \n PrimaryIdAttribute string, \n PrimaryNameAttribute string,\n PrimaryImageAttribute string,\n DisplayName string,\n DisplayCollectionName string,\n LogicalCollectionName string,\n Description string\n )\n";
export declare const INSERT_METADATA_ENTITY = "\n INSERT INTO Metadata__Entity VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?\n )\n";
export declare const SELECT_METADATA_ENTITY = "\n SELECT \n EntityId, \n LogicalName, \n EntitySetName, \n PrimaryIdAttribute, \n PrimaryNameAttribute,\n PrimaryImageAttribute,\n DisplayName,\n DisplayCollectionName,\n LogicalCollectionName,\n Description\n FROM\n Metadata__Entity\n WHERE LogicalName = ?\n";
export declare const SELECT_METADATA_ENTITY_BY_ENTITYSET = "\n SELECT \n EntityId, \n LogicalName, \n EntitySetName, \n PrimaryIdAttribute, \n PrimaryNameAttribute,\n PrimaryImageAttribute,\n DisplayName,\n DisplayCollectionName,\n LogicalCollectionName,\n Description\n FROM\n Metadata__Entity\n WHERE EntitySetName = ?\n";
export interface EntityMetadata {
EntityId: string;
LogicalName: string;
EntitySetName?: string;
PrimaryIdAttribute: string;
PrimaryNameAttribute: string;
PrimaryImageAttribute?: string;
DisplayName?: string;
DisplayCollectionName?: string;
LogicalCollectionName?: string;
Description?: string;
}
export declare class EntityMetadataSQL {
sql: typeof alasql;
constructor(sql: typeof alasql);
AddEntityMetadata(metadata: EntityMetadata): void;
SelectTableMetadata(LogicalName: string): EntityMetadata[];
SelectTableMetadataByEntitySet(EntitySetName: string): EntityMetadata[];
}
//# sourceMappingURL=Metadata.Entity.d.ts.map