rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Table.List

Synopsis

Documentation

newtype ListTable (context :: Context) a Source #

A ListTable value contains zero or more instances of a. You construct ListTables with many or listAgg.

Constructors

ListTable (HListTable (Columns a) (Context a)) 

Instances

Instances details
(Table context a, context ~ context') => Table context' (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Associated Types

type Columns (ListTable context a) 
Instance details

Defined in Rel8.Internal.Table.List

type Columns (ListTable context a) = HListTable (Columns a)
type Context (ListTable context a) 
Instance details

Defined in Rel8.Internal.Table.List

type Context (ListTable context a) = Context a
type FromExprs (ListTable context a) 
Instance details

Defined in Rel8.Internal.Table.List

type FromExprs (ListTable context a) = [FromExprs a]

Methods

toColumns :: ListTable context a -> Columns (ListTable context a) context' Source #

fromColumns :: Columns (ListTable context a) context' -> ListTable context a Source #

fromResult :: Columns (ListTable context a) Result -> FromExprs (ListTable context a) Source #

toResult :: FromExprs (ListTable context a) -> Columns (ListTable context a) Result Source #

context ~ Expr => AltTable (ListTable context) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

(<|>:) :: Table Expr a => ListTable context a -> ListTable context a -> ListTable context a Source #

context ~ Expr => AlternativeTable (ListTable context) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

emptyTable :: Table Expr a => ListTable context a Source #

Projectable (ListTable context) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

project :: Projecting a b => Projection a b -> ListTable context a -> ListTable context b Source #

(context ~ Expr, Table Expr a) => Monoid (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

mempty :: ListTable context a #

mappend :: ListTable context a -> ListTable context a -> ListTable context a #

mconcat :: [ListTable context a] -> ListTable context a #

(context ~ Expr, Table Expr a) => Semigroup (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

(<>) :: ListTable context a -> ListTable context a -> ListTable context a #

sconcat :: NonEmpty (ListTable context a) -> ListTable context a #

stimes :: Integral b => b -> ListTable context a -> ListTable context a #

(EqTable a, context ~ Expr) => EqTable (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

eqTable :: Columns (ListTable context a) (Dict (Sql DBEq)) Source #

(OrdTable a, context ~ Expr) => OrdTable (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

Methods

ordTable :: Columns (ListTable context a) (Dict (Sql DBOrd)) Source #

(ToExprs exprs a, context ~ Expr) => ToExprs (ListTable context exprs) [a] Source # 
Instance details

Defined in Rel8.Internal.Table.List

type Transpose to (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

type Transpose to (ListTable context a) = ListTable to (Transpose to a)
type Columns (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

type Columns (ListTable context a) = HListTable (Columns a)
type Context (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

type Context (ListTable context a) = Context a
type FromExprs (ListTable context a) Source # 
Instance details

Defined in Rel8.Internal.Table.List

type FromExprs (ListTable context a) = [FromExprs a]

($*) :: Projecting a (Expr b) => Projection a (Expr b) -> ListTable Expr a -> Expr [b] infixl 4 Source #

Project a single expression out of a ListTable.

listTable :: Table Expr a => [a] -> ListTable Expr a Source #

Construct a ListTable from a list of expressions.

nameListTable Source #

Arguments

:: Table Name a 
=> a

The names of the columns of elements of the list.

-> ListTable Name a 

Construct a ListTable in the Name context. This can be useful if you have a ListTable that you are storing in a table and need to construct a TableSchema.

head :: Table Expr a => ListTable Expr a -> NullTable Expr a Source #

Get the first element of a ListTable (or nullTable if empty).

index :: Table Expr a => Expr Int32 -> ListTable Expr a -> NullTable Expr a Source #

index i as extracts a single element from as, returning nullTable if i is out of range. Note that although PostgreSQL array indexes are 1-based (by default), this function is always 0-based.

last :: Table Expr a => ListTable Expr a -> NullTable Expr a Source #

Get the last element of a ListTable (or nullTable if empty).

length :: Table Expr a => ListTable Expr a -> Expr Int32 Source #

Get the length of a ListTable