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

Method unwrap

lib/token.js:210–218  ·  view source on GitHub ↗

* Splits this range into a list of two non-wrapping ranges. * * This will return the range itself if it is non-wrapped, or two * ranges otherwise. * * This is useful for CQL range queries, which do not handle * wrapping. * * @returns {TokenRange[]} The list of non-wrapping ra

()

Source from the content-addressed store, hash-verified

208 * @returns {TokenRange[]} The list of non-wrapping ranges.
209 */
210 unwrap() {
211 if (this.isWrappedAround()) {
212 return [
213 new TokenRange(this.start, this._tokenizer.minToken(), this._tokenizer),
214 new TokenRange(this._tokenizer.minToken(), this.end, this._tokenizer)
215 ];
216 }
217 return [this];
218 }
219
220 /**
221 * Whether this range contains a given Token.

Callers

nothing calls this directly

Calls 2

isWrappedAroundMethod · 0.95
minTokenMethod · 0.45

Tested by

no test coverage detected