UNPKG

@abaplint/runtime

Version:
27 lines 926 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchNextCursor = fetchNextCursor; const types_1 = require("../types"); const select_1 = require("./select"); async function fetchNextCursor(context, cursor, target, packageSize) { if (target instanceof types_1.FieldSymbol) { if (target.isAssigned() === false) { throw new Error("GETWA_NOT_ASSIGNED"); } // @ts-ignore target = target.getPointer(); } if (target instanceof types_1.Structure) { packageSize = 1; } const result = await context.cursors[cursor].fetchNextCursor(packageSize); if (result.rows.length === 0) { // @ts-ignore abap.builtin.sy.get().subrc.set(4); return; } // @ts-ignore abap.builtin.sy.get().subrc.set(0); (0, select_1.rowsToTarget)(target, result.rows); } //# sourceMappingURL=fetch_next_cursor.js.map