Backend/node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js
2021-12-31 15:03:23 +05:30

15 lines
381 B
JavaScript

module.exports = ResultSetHeaderPacket;
function ResultSetHeaderPacket(options) {
options = options || {};
this.fieldCount = options.fieldCount;
}
ResultSetHeaderPacket.prototype.parse = function(parser) {
this.fieldCount = parser.parseLengthCodedNumber();
};
ResultSetHeaderPacket.prototype.write = function(writer) {
writer.writeLengthCodedNumber(this.fieldCount);
};