UNPKG

relax-orm

Version:
15 lines 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function mapCommandResult(result, entityRef) { if (!result.outBinds) { throw new Error('No results found.'); } var mappedValues = {}; Object.keys(result.outBinds).forEach(function (r) { var originalKey = r.slice(4); mappedValues[originalKey] = result.outBinds[r][0]; }); return new entityRef(mappedValues); } exports.mapCommandResult = mapCommandResult; //# sourceMappingURL=command-result.mapper.js.map