lib/encoder.js
function setEncoders() {
  this.decoders = {
    [dataTypes.custom]: this.decodeCustom,
    [dataTypes.ascii]: this.decodeAsciiString,
    [dataTypes.bigint]: this.decodeLong,
    [dataTypes.blob]: this.decodeBlob,
    [dataTypes.boolean]: this.decodeBoolean,
    [dataTypes.counter]: this.decodeLong,
    [dataTypes.decimal]: this.decodeDecimal,
    [dataTypes.double]: this.decodeDouble,
    [dataTypes.float]: this.decodeFloat,
    [dataTypes.int]: this.decodeInt,
    [dataTypes.text]: this.decodeUtf8String,
    [dataTypes.timestamp]: this.decodeTimestamp,
    [dataTypes.uuid]: this.decodeUuid,
    [dataTypes.varchar]: this.decodeUtf8String,
    [dataTypes.varint]: this.decodeVarint,
    [dataTypes.timeuuid]: this.decodeTimeUuid,
    [dataTypes.inet]: this.decodeInet,
    [dataTypes.date]: this.decodeDate,
    [dataTypes.time]: this.decodeTime,
    [dataTypes.smallint]: this.decodeSmallint,
    [dataTypes.tinyint]: this.decodeTinyint,
    [dataTypes.list]: this.decodeList,
    [dataTypes.map]: this.decodeMap,
    [dataTypes.set]: this.decodeSet,
    [dataTypes.udt]: this.decodeUdt,
    [dataTypes.tuple]: this.decodeTuple
  };

  this.encoders = {
    [dataTypes.custom]: this.encodeCustom,
    [dataTypes.ascii]: this.encodeAsciiString,
    [dataTypes.bigint]: this.encodeLong,
    [dataTypes.blob]: this.encodeBlob,
    [dataTypes.boolean]: this.encodeBoolean,
    [dataTypes.counter]: this.encodeLong,
    [dataTypes.decimal]: this.encodeDecimal,
    [dataTypes.double]: this.encodeDouble,
    [dataTypes.float]: this.encodeFloat,
    [dataTypes.int]: this.encodeInt,
    [dataTypes.text]: this.encodeUtf8String,
    [dataTypes.timestamp]: this.encodeTimestamp,
    [dataTypes.uuid]: this.encodeUuid,
    [dataTypes.varchar]: this.encodeUtf8String,
    [dataTypes.varint]: this.encodeVarint,
    [dataTypes.timeuuid]: this.encodeUuid,
    [dataTypes.inet]: this.encodeInet,
    [dataTypes.date]: this.encodeDate,
    [dataTypes.time]: this.encodeTime,
    [dataTypes.smallint]: this.encodeSmallint,
    [dataTypes.tinyint]: this.encodeTinyint,
    [dataTypes.list]: this.encodeList,
    [dataTypes.map]: this.encodeMap,
    [dataTypes.set]: this.encodeSet,
    [dataTypes.udt]: this.encodeUdt,
    [dataTypes.tuple]: this.encodeTuple
  };
}
function setEncoders() {
  this.decoders = {
    [dataTypes.custom]: this.decodeCustom,
    [dataTypes.ascii]: this.decodeAsciiString,
    [dataTypes.bigint]: this.decodeLong,
    [dataTypes.blob]: this.decodeBlob,
    [dataTypes.boolean]: this.decodeBoolean,
    [dataTypes.counter]: this.decodeLong,
    [dataTypes.decimal]: this.decodeDecimal,
    [dataTypes.double]: this.decodeDouble,
    [dataTypes.float]: this.decodeFloat,
    [dataTypes.int]: this.decodeInt,
    [dataTypes.text]: this.decodeUtf8String,
    [dataTypes.timestamp]: this.decodeTimestamp,
    [dataTypes.uuid]: this.decodeUuid,
    [dataTypes.varchar]: this.decodeUtf8String,
    [dataTypes.varint]: this.decodeVarint,
    [dataTypes.timeuuid]: this.decodeTimeUuid,
    [dataTypes.inet]: this.decodeInet,
    [dataTypes.date]: this.decodeDate,
    [dataTypes.time]: this.decodeTime,
    [dataTypes.smallint]: this.decodeSmallint,
    [dataTypes.tinyint]: this.decodeTinyint,
    [dataTypes.list]: this.decodeList,
    [dataTypes.map]: this.decodeMap,
    [dataTypes.set]: this.decodeSet,
    [dataTypes.udt]: this.decodeUdt,
    [dataTypes.tuple]: this.decodeTuple
  };

  this.encoders = {
    [dataTypes.custom]: this.encodeCustom,
    [dataTypes.ascii]: this.encodeAsciiString,
    [dataTypes.bigint]: this.encodeLong,
    [dataTypes.blob]: this.encodeBlob,
    [dataTypes.boolean]: this.encodeBoolean,
    [dataTypes.counter]: this.encodeLong,
    [dataTypes.decimal]: this.encodeDecimal,
    [dataTypes.double]: this.encodeDouble,
    [dataTypes.float]: this.encodeFloat,
    [dataTypes.int]: this.encodeInt,
    [dataTypes.text]: this.encodeUtf8String,
    [dataTypes.timestamp]: this.encodeTimestamp,
    [dataTypes.uuid]: this.encodeUuid,
    [dataTypes.varchar]: this.encodeUtf8String,
    [dataTypes.varint]: this.encodeVarint,
    [dataTypes.timeuuid]: this.encodeUuid,
    [dataTypes.inet]: this.encodeInet,
    [dataTypes.date]: this.encodeDate,
    [dataTypes.time]: this.encodeTime,
    [dataTypes.smallint]: this.encodeSmallint,
    [dataTypes.tinyint]: this.encodeTinyint,
    [dataTypes.list]: this.encodeList,
    [dataTypes.map]: this.encodeMap,
    [dataTypes.set]: this.encodeSet,
    [dataTypes.udt]: this.encodeUdt,
    [dataTypes.tuple]: this.encodeTuple
  };
}
function setEncoders ( ) { this . decoders = { [ dataTypes . custom ] : this . decodeCustom , [ dataTypes . ascii ] : this . decodeAsciiString , [ dataTypes . bigint ] : this . decodeLong , [ dataTypes . blob ] : this . decodeBlob , [ dataTypes . boolean ] : this . decodeBoolean , [ dataTypes . counter ] : this . decodeLong , [ dataTypes . decimal ] : this . decodeDecimal , [ dataTypes . double ] : this . decodeDouble , [ dataTypes . float ] : this . decodeFloat , [ dataTypes . int ] : this . decodeInt , [ dataTypes . text ] : this . decodeUtf8String , [ dataTypes . timestamp ] : this . decodeTimestamp , [ dataTypes . uuid ] : this . decodeUuid , [ dataTypes . varchar ] : this . decodeUtf8String , [ dataTypes . varint ] : this . decodeVarint , [ dataTypes . timeuuid ] : this . decodeTimeUuid , [ dataTypes . inet ] : this . decodeInet , [ dataTypes . date ] : this . decodeDate , [ dataTypes . time ] : this . decodeTime , [ dataTypes . smallint ] : this . decodeSmallint , [ dataTypes . tinyint ] : this . decodeTinyint , [ dataTypes . list ] : this . decodeList , [ dataTypes . map ] : this . decodeMap , [ dataTypes . set ] : this . decodeSet , [ dataTypes . udt ] : this . decodeUdt , [ dataTypes . tuple ] : this . decodeTuple } ; this . encoders = { [ dataTypes . custom ] : this . encodeCustom , [ dataTypes . ascii ] : this . encodeAsciiString , [ dataTypes . bigint ] : this . encodeLong , [ dataTypes . blob ] : this . encodeBlob , [ dataTypes . boolean ] : this . encodeBoolean , [ dataTypes . counter ] : this . encodeLong , [ dataTypes . decimal ] : this . encodeDecimal , [ dataTypes . double ] : this . encodeDouble , [ dataTypes . float ] : this . encodeFloat , [ dataTypes . int ] : this . encodeInt , [ dataTypes . text ] : this . encodeUtf8String , [ dataTypes . timestamp ] : this . encodeTimestamp , [ dataTypes . uuid ] : this . encodeUuid , [ dataTypes . varchar ] : this . encodeUtf8String , [ dataTypes . varint ] : this . encodeVarint , [ dataTypes . timeuuid ] : this . encodeUuid , [ dataTypes . inet ] : this . encodeInet , [ dataTypes . date ] : this . encodeDate , [ dataTypes . time ] : this . encodeTime , [ dataTypes . smallint ] : this . encodeSmallint , [ dataTypes . tinyint ] : this . encodeTinyint , [ dataTypes . list ] : this . encodeList , [ dataTypes . map ] : this . encodeMap , [ dataTypes . set ] : this . encodeSet , [ dataTypes . udt ] : this . encodeUdt , [ dataTypes . tuple ] : this . encodeTuple } ; }
Sets the encoder and decoder methods for this instance
@private
Sets the encoder and decoder methods for this instance