folio

package folio

Members list

Type members

Classlikes

object Cursor

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Cursor.type
trait CursorCodec

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object CursorCodec

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class DecodedCursor(direction: Direction, position: Position)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum Direction

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait FieldSchema[FIELD]

Binds a user-defined field type to a string identifier used as the column/attribute name in queries and cursor encoding.

Binds a user-defined field type to a string identifier used as the column/attribute name in queries and cursor encoding.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Schema[FIELD]
class SnakeCase[FIELD]
object FieldSchema

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait FilterBy[FIELD]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ExactMatch[FIELD]
object FilterBy

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
FilterBy.type
sealed abstract class FolioError(message: String) extends Exception

Attributes

Companion
object
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object FolioError

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
FolioError.type
trait KeysetField[FIELD, T]

Enables keyset pagination by both designating the id field within FIELD and extracting the id Long from a row of type T. Provide one alongside your FieldSchema to opt into keyset; omit it to fall back to offset-only pagination.

Enables keyset pagination by both designating the id field within FIELD and extracting the id Long from a row of type T. Provide one alongside your FieldSchema to opt into keyset; omit it to fall back to offset-only pagination.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object KeysetField

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object Limit

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Limit.type
enum Order

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Order

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Order.type
case class Page[T](limit: Limit, previousCursor: Option[Cursor], nextCursor: Option[Cursor], data: Seq[T])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Page

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Page.type
sealed trait Position

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Keyset
class Offset
object Position

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Position.type
case class Query[FIELD](filters: Set[FilterBy[FIELD]], sortBys: ListSet[SortBy[FIELD]], limit: Option[Limit], cursor: Option[Cursor] = ...)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Query

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Query.type
case class ResolvedQuery[FIELD](filters: Set[FilterBy[FIELD]], sortBys: ListSet[SortBy[FIELD]], limit: Limit, position: Position)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SortBy[FIELD](order: Order, field: FIELD)(implicit evidence$1: FieldSchema[FIELD])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

opaque type Cursor
opaque type Limit

Extensions

Extensions

extension (cursor: Cursor)
def decode[FIELD : FieldSchema](query: Query[FIELD])(implicit evidence$1: FieldSchema[FIELD], CursorCodec): Either[CursorDecodingError, DecodedCursor]
extension (decoded: DecodedCursor)
def encode[FIELD : FieldSchema](query: Query[FIELD])(implicit evidence$1: FieldSchema[FIELD], CursorCodec): Cursor
extension [FIELD](field: FIELD)
def ascending: SortBy[FIELD]
def descending: SortBy[FIELD]
extension [FIELD](field: FIELD)(using fieldSchema: FieldSchema[FIELD])
def name: String
extension [FIELD](query: Query[FIELD])(implicit evidence$1: FieldSchema[FIELD], CursorCodec)
inline def toCursor(direction: Direction = ...): Cursor
extension [FIELD](sortBys: ListSet[SortBy[FIELD]])
def flipOrder: ListSet[SortBy[FIELD]]