How to use the cassandra-driver.types.TimeUuid 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 ahlwong / dakota-cassandra / lib / types.js View on Github external
if (value instanceof nmCassandraTypes.BigDecimal) {
    return value.toNumber();
  }
  else if (value instanceof nmCassandraTypes.InetAddress) {
    return value.toString();
  }
  else if (value instanceof nmCassandraTypes.Integer) {
    return value.toNumber();
  }
  else if (value instanceof nmCassandraTypes.LocalDate) {
    return value.toString();
  }
  else if (value instanceof nmCassandraTypes.LocalTime) {
    return value.toString();
  }
  else if (value instanceof nmCassandraTypes.TimeUuid) {
    return value.toString();
  }
  else if (value instanceof nmCassandraTypes.Uuid) {
    return value.toString();
  }
  
  // array
  if (nm_.isArray(value)) {
    nm_.each(value, function(v, index) {
      value[index] = exports.castValue(dakota, v);
    });
    return value;
  }
  
  // hash
  else if (lHelpers.isPlainObject(value)) {
github dtoubelis / sails-cassandra / lib / util.js View on Github external
var types = require('cassandra-driver').types,
  Uuid = types.Uuid,
  TimeUuid = types.TimeUuid,
  Integer = types.Integer,
  BigDecimal = types.BigDecimal,
  InetAddress = types.InetAddress,
  LocalDate = types.LocalDate,
  LocalTime = types.LocalTime,
  Long = types.Long;


/**
 * Cast value from Cassandra data type to Waterline type
 *
 * @param value
 * @returns {*}
 */
exports.castFromCassandraToWaterline = function(value) {