apache-arrow
Version:
Apache Arrow columnar in-memory format
39 lines (37 loc) • 1.21 kB
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
import * as flatbuffers from '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
*/
export 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);
}
}
//# sourceMappingURL=struct-.mjs.map