* Serializes and deserializes to and from a CQL type and a Javascript Type. * @param {Number} protocolVersion * @constructor
(protocolVersion, options)
| 137 | * @constructor |
| 138 | */ |
| 139 | function Encoder(protocolVersion, options) { |
| 140 | this.encodingOptions = options.encoding || utils.emptyObject; |
| 141 | defineInstanceMembers.call(this); |
| 142 | this.setProtocolVersion(protocolVersion); |
| 143 | setEncoders.call(this); |
| 144 | if (this.encodingOptions.copyBuffer) { |
| 145 | this.handleBuffer = handleBufferCopy; |
| 146 | } |
| 147 | else { |
| 148 | this.handleBuffer = handleBufferRef; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Declares the privileged instance members. |
nothing calls this directly
no test coverage detected