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

Method _parseKeyspace

lib/metadata/schema-parser.js:688–706  ·  view source on GitHub ↗
(row, virtual)

Source from the content-addressed store, hash-verified

686 }
687
688 _parseKeyspace(row, virtual) {
689 const replication = row['replication'];
690 let strategy;
691 let strategyOptions;
692 if (replication) {
693 strategy = replication['class'];
694 strategyOptions = {};
695 for (const key in replication) {
696 if (!replication.hasOwnProperty(key) || key === 'class') {
697 continue;
698 }
699 strategyOptions[key] = replication[key];
700 }
701 }
702
703 const ks = this._createKeyspace(row['keyspace_name'], row['durable_writes'], strategy, strategyOptions, virtual);
704 ks.graphEngine = row['graph_engine'];
705 return ks;
706 }
707
708 async _parseTableOrView(tableInfo, tableRow, columnRows, indexRows, virtual) {
709 const encoder = this.cc.getEncoder();

Callers 4

getKeyspacesMethod · 0.95
getKeyspaceMethod · 0.95
getKeyspacesMethod · 0.80
_getKeyspaceMethod · 0.80

Calls 1

_createKeyspaceMethod · 0.80

Tested by

no test coverage detected