SchemaVer

object SchemaVer
Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

final case class Full(model: Int, revision: Int, addition: Int) extends SchemaVer

An explicit, fully known version. It can be attached to both self-describing data and self-describing schema.

An explicit, fully known version. It can be attached to both self-describing data and self-describing schema.

final case class Partial(model: Option[Int], revision: Option[Int], addition: Option[Int]) extends SchemaVer

A partially known version. It can be attached only to self-describing data. (A self-describing schema must be capable of being looked up by version.)

A partially known version. It can be attached only to self-describing data. (A self-describing schema must be capable of being looked up by version.)

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def apply(model: Int, revision: Int, addition: Int): SchemaVer
def isValid(version: String): Boolean

Check if a string is a valid SchemaVer.

Check if a string is a valid SchemaVer.

Value parameters:
version

The string to be checked.

Returns:

true if the string is a valid SchemaVer.

def parse(version: String): Either[ParseError, SchemaVer]

Parse the MODEL, REVISION, and ADDITION components of a SchemaVer, which can be potentially unknown.

Parse the MODEL, REVISION, and ADDITION components of a SchemaVer, which can be potentially unknown.

def parseFull(version: String): Either[ParseError, Full]

Parse the MODEL, REVISION, and ADDITION components of a SchemaVer.Full, which are always known.

Parse the MODEL, REVISION, and ADDITION components of a SchemaVer.Full, which are always known.

Concrete fields

A regular expression to validate or extract a SchemaVer.Full, with known MODEL, REVISION and ADDITION.

A regular expression to validate or extract a SchemaVer.Full, with known MODEL, REVISION and ADDITION.

The MODEL cannot be 0.

A regular expression to validate or extract a SchemaVer.Partial, with potentially unknown MODEL, REVISION or ADDITION.

A regular expression to validate or extract a SchemaVer.Partial, with potentially unknown MODEL, REVISION or ADDITION.

Implicits

Implicits

implicit val ordering: Ordering[SchemaVer]

A default Ordering instance for a SchemaVer, in ascending order.

A default Ordering instance for a SchemaVer, in ascending order.

implicit val orderingFull: Ordering[Full]

A default Ordering instance for a SchemaVer.Full, in ascending order.

A default Ordering instance for a SchemaVer.Full, in ascending order.