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

Function getControlConnectionForTable

test/unit/metadata-tests.js:2567–2578  ·  view source on GitHub ↗
(tableRow, columnRows, indexRows, protocolVersion = 4)

Source from the content-addressed store, hash-verified

2565});
2566
2567function getControlConnectionForTable(tableRow, columnRows, indexRows, protocolVersion = 4) {
2568 return getControlConnectionForResponse(q => {
2569 if (q.indexOf('system.schema_columnfamilies') >= 0 || q.indexOf('system_schema.tables') >= 0) {
2570 return { rows: [tableRow] };
2571 }
2572 if (q.indexOf('system_schema.indexes') >= 0) {
2573 return { rows: (indexRows || []) };
2574 }
2575
2576 return {rows: columnRows};
2577 }, null, protocolVersion);
2578}
2579
2580function getControlConnectionForRows(rows, protocolVersion = 4) {
2581 return getControlConnectionForResponse({ rows }, null, protocolVersion);

Callers 1

metadata-tests.jsFile · 0.85

Calls 1

Tested by

no test coverage detected