UNPKG

apache-arrow

Version:

Apache Arrow columnar in-memory format

43 lines (41 loc) 1.33 kB
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify Object.defineProperty(exports, "__esModule", { value: true }); exports.Struct_ = void 0; const flatbuffers = require("flatbuffers"); /** * A Struct_ in the flatbuffer metadata is the same as an Arrow Struct * (according to the physical memory layout). We used Struct_ here as * Struct is a reserved word in Flatbuffers */ class Struct_ { constructor() { this.bb = null; this.bb_pos = 0; } __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsStruct_(bb, obj) { return (obj || new Struct_()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsStruct_(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new Struct_()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static startStruct_(builder) { builder.startObject(0); } static endStruct_(builder) { const offset = builder.endObject(); return offset; } static createStruct_(builder) { Struct_.startStruct_(builder); return Struct_.endStruct_(builder); } } exports.Struct_ = Struct_; //# sourceMappingURL=struct-.js.map