I wrote below stored procedure to insert data,will my results be cached or what should i do the cache the results.
CREATE VIRTUAL PROCEDURE
BEGIN
DECLARE integer VARIABLES.counter = 0;
DELETE FROM EPCSchema.COMPONENT;
INSERT INTO EPCSchema.COMPONENT (EPCSchema.COMPONENT.guid, EPCSchema.COMPONENT.name, EPCSchema.COMPONENT.componentdescription, EPCSchema.COMPONENT.iscomponenthierarchy, EPCSchema.COMPONENT.isbundle, EPCSchema.COMPONENT.max, EPCSchema.COMPONENT.min, EPCSchema.COMPONENT.qualification) SELECT COMPONENT.guid, COMPONENT.name, COMPONENT.componentDescription, DECODEINTEGER(COMPONENT.isComponentHierarchy, 'false,0,true,1,null') AS iscomponenthierarchy, DECODEINTEGER(COMPONENT.isBundle, 'false,0,true,1,null') AS isbundle, COMPONENT.max, COMPONENT.min, COMPONENT.qualification FROM (EXEC GetXml.getTextFiles('Component.xml')) AS f, XMLTABLE('$d/components/component' PASSING XMLPARSE(DOCUMENT F.file) AS d COLUMNS guid string PATH '@guid', name string PATH 'name', componentDescription string PATH 'componentDescription', isComponentHierarchy string PATH 'isComponentHierarchy', isBundle string PATH 'isBundle', max integer PATH 'max', min integer PATH 'min', qualification string PATH 'qualification') AS component ORDER BY name;
VARIABLES.counter = SELECT COUNT(*) FROM EPCSchema.COMPONENT;
IF(VARIABLES.counter > 0)
BEGIN
SELECT 'DATA INSERTED SUCCESSFULLY' AS message;
END
ELSE
BEGIN
ERROR 'UNABLE TO INSERT DATA';
END
END