ResultSetHeaderPacket.js 381 B

1234567891011121314
  1. module.exports = ResultSetHeaderPacket;
  2. function ResultSetHeaderPacket(options) {
  3. options = options || {};
  4. this.fieldCount = options.fieldCount;
  5. }
  6. ResultSetHeaderPacket.prototype.parse = function(parser) {
  7. this.fieldCount = parser.parseLengthCodedNumber();
  8. };
  9. ResultSetHeaderPacket.prototype.write = function(writer) {
  10. writer.writeLengthCodedNumber(this.fieldCount);
  11. };