Schema

com.alecdorrington.iris.query.Schema
See theSchema companion class
object Schema extends DerivedSchemas

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Schema.type

Members list

Value members

Concrete methods

def apply[A](using schema: Schema[A]): Schema[A]

Summons the schema of A.

Summons the schema of A.

Type parameters

A

The type.

Attributes

Returns

The schema of A.

transparent inline def derived[A](using mirror: Of[A]): Schema[A]

Derives the schema of a case class, sealed trait or enum, as a schema is derived wherever it is needed, but once, for derives Schema, which names any field whose type has none.

Derives the schema of a case class, sealed trait or enum, as a schema is derived wherever it is needed, but once, for derives Schema, which names any field whose type has none.

Type parameters

A

The type.

Attributes

Returns

The schema of A.

inline def of[A : Encoder : Decoder](json: Json): Schema[A]

Creates a schema of a codec and a JSON Schema of one's own, which the codec must keep to.

Creates a schema of a codec and a JSON Schema of one's own, which the codec must keep to.

Type parameters

A

The type.

Value parameters

json

The JSON Schema of the type's values.

Attributes

Returns

A schema writing and reading through circe's codec.

Givens

Givens

given given_Schema_BigDecimal: Schema[BigDecimal]
given given_Schema_BigInt: Schema[BigInt]
given given_Schema_Boolean: Schema[Boolean]
given given_Schema_Double: Schema[Double]
given given_Schema_Either: [L, R] => (Schema[L], Schema[R]) => Schema[Either[L, R]]

Either of two values, held under Left or Right.

Either of two values, held under Left or Right.

Attributes

given given_Schema_Float: Schema[Float]
given given_Schema_Int: Schema[Int]
given given_Schema_List: [A] => Schema[A] => Schema[List[A]]
given given_Schema_Long: Schema[Long]
given given_Schema_Map: [A] => Schema[A] => Schema[Map[String, A]]
given given_Schema_Option: [A] => Schema[A] => Schema[Option[A]]

An optional value, which as a field may also be left out.

An optional value, which as a field may also be left out.

Attributes

given given_Schema_Seq: [A] => Schema[A] => Schema[Seq[A]]
given given_Schema_Set: [A] => Schema[A] => Schema[Set[A]]
given given_Schema_Stream: [F[_], A] => Schema[A] => Schema[Stream[F, A]]

A stream of values, as an array of them. QueryService.send hands it over as soon as its array begins, each value then read as soon as the model has written it; a stream read from a reply already whole holds its values from the start. A stream cannot be said as JSON, as it would have to be run: say a list of its values instead.

A stream of values, as an array of them. QueryService.send hands it over as soon as its array begins, each value then read as soon as the model has written it; a stream read from a reply already whole holds its values from the start. A stream cannot be said as JSON, as it would have to be run: say a list of its values instead.

Type parameters

A

The type of the values.

F

The effect type, which QueryService.send must share.

Attributes

Returns

The schema of the stream.

given given_Schema_String: Schema[String]
transparent inline given given_Schema_T: [T <: Tuple] => ProductOf[T] => Schema[T]

A tuple, as an array of its elements.

A tuple, as an array of its elements.

Type parameters

T

The type of the tuple.

Attributes

Returns

The schema of the tuple.

given given_Schema_Vector: [A] => Schema[A] => Schema[Vector[A]]

Inherited givens

transparent inline given alternativeSchema: [A] => Schema[A]

Makes the schema of a union, any one of its alternatives, each of which has one, or of a literal type, its value alone.

Makes the schema of a union, any one of its alternatives, each of which has one, or of a literal type, its value alone.

Type parameters

A

The type.

Attributes

Returns

The schema of A.

Inherited from:
DerivedSchemas
transparent inline given derivedSchema: [A] => (Of[A], NotGiven[Encoder[A]]) => Schema[A]

Derives the schema of a case class, sealed trait or enum wherever one is needed, where each of its fields has one, but never over a circe Encoder of its own, which says how it is written already.

Derives the schema of a case class, sealed trait or enum wherever one is needed, where each of its fields has one, but never over a circe Encoder of its own, which says how it is written already.

Type parameters

A

The type.

Attributes

Returns

The schema of A.

Inherited from:
DerivedSchemas