Backend/node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js

15 lines
381 B
JavaScript
Raw Normal View History

2021-12-31 09:33:23 +00:00
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);
};