All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kaizensolutions.virgil.cql.ValueInCql.scala Maven / Gradle / Ivy

The newest version!
package io.kaizensolutions.virgil.cql

import io.kaizensolutions.virgil.codecs.CqlRowComponentEncoder

/**
 * Represents a Scala value present in a CQL interpolated string which
 * ultimately needs to be sent to Cassandra along with a query ValueInCql also
 * has the sufficient capability to write the data into the underlying Datastax
 * statement
 */
private[virgil] trait ValueInCql {
  type ScalaType
  def value: ScalaType
  def writer: CqlRowComponentEncoder[ScalaType]

  override def toString: String =
    value.toString
}
object ValueInCql extends ValueInCqlInstances {
  // Type Refinement
  type WithScalaType[Sc] = ValueInCql { type ScalaType = Sc }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy