@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
26 lines • 2.78 kB
TypeScript
import type { ShkoOnline } from '../../../ShkoOnline';
import alasql from 'alasql';
export declare const CREATE_TABLE_METADATA_ATTRIBUTE = "\n CREATE TABLE Metadata__Attribute(\n EntityId UniqueIdentifier, \n AttributeId UniqueIdentifier PRIMARY KEY, \n LogicalName string, \n AttributeType int,\n DefaultFormValue int NULL,\n OptionSetId UniqueIdentifier,\n AttributeOf string NULL,\n AttributeTypeName string\n )\n";
export declare const INSERT_METADATA_ATTRIBUTE = "\n INSERT INTO Metadata__Attribute VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?\n )\n";
export declare const SELECT_METADATA_ATTRIBUTE = "\n SELECT\n E.LogicalName as EntityLogicalName, \n AttributeId, \n A.LogicalName as LogicalName, \n AttributeType,\n DefaultFormValue,\n OptionSetId,\n AttributeOf,\n AttributeTypeName\n FROM \n Metadata__Attribute A \n INNER JOIN\n Metadata__Entity E ON A.EntityId=E.EntityId\n WHERE A.LogicalName = ? AND E.LogicalName = ?\n";
export declare const SELECT_METADATA_ATTRIBUTE_BY_ID = "\n SELECT\n E.LogicalName as EntityLogicalName, \n AttributeId, \n A.LogicalName as LogicalName, \n AttributeType,\n DefaultFormValue,\n OptionSetId,\n AttributeOf,\n AttributeTypeName\n FROM \n Metadata__Attribute A \n INNER JOIN\n Metadata__Entity E ON A.EntityId=E.EntityId\n WHERE A.AttributeId = ?\n";
export declare const SELECT_METADATA_ATTRIBUTES = "\n SELECT\n E.LogicalName as EntityLogicalName, \n AttributeId, \n A.LogicalName as LogicalName, \n AttributeType,\n DefaultFormValue,\n OptionSetId,\n AttributeOf,\n AttributeTypeName\n FROM \n Metadata__Attribute AS A \n INNER JOIN\n Metadata__Entity AS E ON A.EntityId=E.EntityId\n WHERE E.LogicalName = ?\n";
export interface AttributeDB {
EntityId: string;
AttributeId: string;
LogicalName: string;
AttributeType: ShkoOnline.AttributeType;
AttributeTypeName: string;
DefaultFormValue?: number;
OptionSetId?: string;
AttributeOf?: string;
}
export declare class AttributeMetadataSQL {
sql: typeof alasql;
constructor(sql: typeof alasql);
AddAttributeMetadata(metadata: AttributeDB): void;
SelectAttributeMetadata(AttributeLogicalName: string, EntityLogicalName: string): AttributeDB[];
SelectAttributeMetadataById(AttributeId: string): AttributeDB[];
SelectAttributeMetadataForTable(EntityLogicalName: string): AttributeDB[];
}
//# sourceMappingURL=Metadata.Attribute.d.ts.map