FieldUpdate

zio.blocks.projection.FieldUpdate
See theFieldUpdate companion enum
object FieldUpdate

Attributes

Companion
enum
Source
FieldUpdate.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply(field: String, value: Any): Set

Same as Set(field, value), using a column name written out in full.

Same as Set(field, value), using a column name written out in full.

Attributes

Source
FieldUpdate.scala
inline def decrement[A](inline selector: A => Any, by: Long = ...): Decrement

Subtracts by from the selected field, atomically in the store.

Subtracts by from the selected field, atomically in the store.

Attributes

Source
FieldUpdate.scala
def decrement(field: String, by: Long): Decrement

Attributes

Source
FieldUpdate.scala
inline def increment[A](inline selector: A => Any, by: Long = ...): Increment

Adds by to the selected field, atomically in the store. A missing row is created first, so incrementing a counter that does not exist yet gives by.

Adds by to the selected field, atomically in the store. A missing row is created first, so incrementing a counter that does not exist yet gives by.

FieldUpdate.increment[Stats](_.userCount)       // Increment("user_count", 1)
FieldUpdate.increment[Stats](_.userCount, 5L)   // Increment("user_count", 5)

Attributes

Source
FieldUpdate.scala
def increment(field: String, by: Long): Increment

Attributes

Source
FieldUpdate.scala
inline def maxValue[A](inline selector: A => Any, value: Long): Max

Keeps the larger of the stored value and value for the selected field.

Keeps the larger of the stored value and value for the selected field.

Attributes

Source
FieldUpdate.scala
def maxValue(field: String, value: Long): Max

Attributes

Source
FieldUpdate.scala
inline def minValue[A](inline selector: A => Any, value: Long): Min

Keeps the smaller of the stored value and value for the selected field.

Keeps the smaller of the stored value and value for the selected field.

Attributes

Source
FieldUpdate.scala
def minValue(field: String, value: Long): Min

Attributes

Source
FieldUpdate.scala
inline def setValue[A](inline selector: A => Any, value: Any): Set

Replaces the value of the selected field. The field is chosen with a selector such as _.userCount, checked at compile time, and mapped to its snake_case column name.

Replaces the value of the selected field. The field is chosen with a selector such as _.userCount, checked at compile time, and mapped to its snake_case column name.

FieldUpdate.setValue[Stats](_.peak, 10L)   // Set("peak", 10L)

Attributes

Source
FieldUpdate.scala