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

Function pageCallback

lib/client.js:695–716  ·  view source on GitHub ↗
(err, result)

Source from the content-addressed store, hash-verified

693 const nextPage = () => promiseUtils.toCallback(this._execute(query, params, execOptions), pageCallback);
694
695 function pageCallback (err, result) {
696 if (err) {
697 return callback(err);
698 }
699 // Next requests in case paging (auto or explicit) is used
700 rowLength += result.rowLength;
701
702 if (result.rawPageState !== undefined) {
703 // Use new page state as next request page state
704 execOptions.setPageState(result.rawPageState);
705 if (execOptions.isAutoPage()) {
706 // Issue next request for the next page
707 return nextPage();
708 }
709 // Allows for explicit (manual) paging, in case the caller needs it
710 result.nextPage = nextPage;
711 }
712
713 // Finished auto-paging
714 result.rowLength = rowLength;
715 callback(null, result);
716 }
717
718 promiseUtils.toCallback(this._execute(query, params, execOptions), pageCallback);
719};

Callers

nothing calls this directly

Calls 3

nextPageFunction · 0.85
isAutoPageMethod · 0.65
setPageStateMethod · 0.45

Tested by

no test coverage detected