MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / readStringMultiMap

Method readStringMultiMap

lib/readers.js:221–233  ·  view source on GitHub ↗

* Reads an associative array of strings as keys and string lists as values * @returns {Object}

()

Source from the content-addressed store, hash-verified

219 * @returns {Object}
220 */
221 readStringMultiMap() {
222 //A [short] n, followed by n pair <k><v> where <k> is a
223 //[string] and <v> is a [string[]].
224 const length = this.readShort();
225 if (length < 0) {
226 return null;
227 }
228 const map = {};
229 for (let i = 0; i < length; i++) {
230 map[this.readString()] = this.readStringList();
231 }
232 return map;
233 }
234
235 /**
236 * Reads a data type definition

Callers 1

streams.jsFile · 0.80

Calls 3

readShortMethod · 0.95
readStringMethod · 0.95
readStringListMethod · 0.95

Tested by

no test coverage detected