mysql2
Version:
fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS
17 lines (13 loc) • 375 B
JavaScript
class PreparedStatementHeader {
constructor(packet) {
packet.skip(1); // should be 0
this.id = packet.readInt32();
this.fieldCount = packet.readInt16();
this.parameterCount = packet.readInt16();
packet.skip(1); // should be 0
this.warningCount = packet.readInt16();
}
}
// TODO: toPacket
module.exports = PreparedStatementHeader;
;