How to use the cassandra-driver.Row function in cassandra-driver

To help you get started, we’ve selected a few cassandra-driver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oaeproject / Hilary / node_modules / oae-util / lib / cassandra.js View on Github external
// Clean the key off the row if it was not requested
      if (!returnKeyColumn) {
        const newRowContent = [];
        _.each(row.keys(), eachKey => {
          if (eachKey !== keyColumnName) {
            newRowContent.push({
              key: eachKey,
              value: row.get(eachKey),
              column: _.find(columns, eachItem => {
                return eachItem.name === eachKey;
              })
            });
          }
        });

        row = new Row(_.pluck(newRowContent, 'column'));
        _.each(newRowContent, eachNewRowContent => {
          row[eachNewRowContent.key] = eachNewRowContent.value;
        });
      }
      requestedRowColumns.push(row);
    });
    rows = requestedRowColumns;