package util
- Alphabetic
- Public
- Protected
Type Members
- trait Display[A] extends AnyRef
Typeclass for things that can be shown in a user interface.
- trait Enumerated[A] extends Order[A] with Encoder[A] with Decoder[A]
Typeclass for an enumerated type with unique string tags and a canonical ordering.
- final class Gid[A] extends BoundedEnumerable[A] with Order[A] with Show[A] with Encoder[A] with Decoder[A]
A typeclass for Lucuma identifiers, which are of the form T-26fd21b3 where T is a constant, type-specific tag and the remainder is a positive hex-encoded Long, with lowercase alpha digits and no leading zeros (thus having a unique string representation).
A typeclass for Lucuma identifiers, which are of the form T-26fd21b3 where T is a constant, type-specific tag and the remainder is a positive hex-encoded Long, with lowercase alpha digits and no leading zeros (thus having a unique string representation).
case class Foo(id: Foo.Id, ...) object Foo { case class Id(value: PosLong) object Id { implicit val GidId: Gid[Id] = Gid.instance('f', _.value, apply) } }
Database tables can use such values as primary keys.
CREATE DOMAIN foo_dom AS VARCHAR CHECK(VALUE ~ '^f-([1-9a-f][0-9a-f]*)$'); CREATE SEQUENCE foo_seq START WITH 256; CREATE TABLE foo ( foo_id varchar NOT NULL PRIMARY KEY DEFAULT 'f-' || to_hex(nextval('foo_seq')), ... )
- trait Obsoletable[A] extends AnyRef
- trait Tag[T, U] extends AnyRef
Typeclass placing a tag
Uon typeT.Typeclass placing a tag
Uon typeT. Helps produce tagged instances ofT. - sealed abstract case class Timestamp extends Product with Serializable
Timestamp wraps a
java.util.Instantthat is truncated to microsecond resolution.Timestamp wraps a
java.util.Instantthat is truncated to microsecond resolution. This allows Timestamps to roundtrip to/from the database where only microsecond resolution is supported. In addition the min and max instants that are supported are determined by the postgres limit for timestamps. - trait TypeString[T] extends AnyRef
Typeclass defining a custom serialized representation of type
T. - final class Uid[A] extends Order[A] with Show[A] with Encoder[A] with Decoder[A]
A typeclass representing a type-specific tag and a UUID.
A typeclass representing a type-specific tag and a UUID. For example,
a-f1006c8d-659d-44a4-a557-79879c3e8f95identifies an atom ID with the leadingaprefix. - class WithGid extends AnyRef
Defines
<Entity>.Idclass, itsGidinstance, and convenience methods. - class WithUid extends AnyRef
Value Members
- object Display
- object Enumerated extends Serializable
- object Gid extends Serializable
- object Timestamp extends Serializable
- object Uid extends Serializable
Defines
<Entity>.Idclass, itsGidinstance, and convenience methods.