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
- sealed abstract case class Timestamp extends Product with Serializable
Timestamp wraps a
java.util.Instant
that is truncated to microsecond resolution.Timestamp wraps a
java.util.Instant
that 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.
Value Members
- object Display
- object Enumerated extends Serializable
- object Gid extends Serializable
- object Timestamp extends Serializable