Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Rel8.Array
Contents
Synopsis
- data ListTable context a
- head :: Table Expr a => ListTable Expr a -> NullTable Expr a
- headExpr :: Sql DBType a => Expr [a] -> Expr (Nullify a)
- index :: Table Expr a => Expr Int32 -> ListTable Expr a -> NullTable Expr a
- indexExpr :: Sql DBType a => Expr Int32 -> Expr [a] -> Expr (Nullify a)
- last :: Table Expr a => ListTable Expr a -> NullTable Expr a
- lastExpr :: Sql DBType a => Expr [a] -> Expr (Nullify a)
- length :: Table Expr a => ListTable Expr a -> Expr Int32
- lengthExpr :: Expr [a] -> Expr Int32
- data NonEmptyTable context a
- head1 :: Table Expr a => NonEmptyTable Expr a -> a
- head1Expr :: Sql DBType a => Expr (NonEmpty a) -> Expr a
- index1 :: Table Expr a => Expr Int32 -> NonEmptyTable Expr a -> NullTable Expr a
- index1Expr :: Sql DBType a => Expr Int32 -> Expr (NonEmpty a) -> Expr (Nullify a)
- last1 :: Table Expr a => NonEmptyTable Expr a -> a
- last1Expr :: Sql DBType a => Expr (NonEmpty a) -> Expr a
- length1 :: Table Expr a => NonEmptyTable Expr a -> Expr Int32
- length1Expr :: Expr (NonEmpty a) -> Expr Int32
- unsafeSubscript :: Sql DBType b => Expr a -> Expr i -> Expr b
- unsafeSubscripts :: (Table Expr i, Sql DBType b) => Expr a -> i -> Expr b
ListTable
data ListTable context a Source #
A ListTable
value contains zero or more instances of a
. You construct
ListTable
s with many
or listAgg
.
Instances
NonEmptyTable
data NonEmptyTable context a Source #
A NonEmptyTable
value contains one or more instances of a
. You
construct NonEmptyTable
s with some
or nonEmptyAgg
.
Instances
head1 :: Table Expr a => NonEmptyTable Expr a -> a Source #
Get the first element of a NonEmptyTable
.
last1 :: Table Expr a => NonEmptyTable Expr a -> a Source #
Get the last element of a NonEmptyTable
.
length1 :: Table Expr a => NonEmptyTable Expr a -> Expr Int32 Source #
Get the length of a NonEmptyTable
Unsafe
unsafeSubscript :: Sql DBType b => Expr a -> Expr i -> Expr b Source #
will generate the SQL unsafeSubscript
a ia[i]
.
Note that this function is not type checked and the generated SQL has no casts. This is only intended an escape hatch to be used if Rel8 cannot otherwise express the expression you need. If you find yourself using this function, please let us know, as it may indicate that something is missing from Rel8!
unsafeSubscripts :: (Table Expr i, Sql DBType b) => Expr a -> i -> Expr b Source #
will generate the SQL unsafeSubscripts
a (i, j)a[i][j]
.
Note that this function is not type checked and the generated SQL has no casts. This is only intended an escape hatch to be used if Rel8 cannot otherwise express the expression you need. If you find yourself using this function, please let us know, as it may indicate that something is missing from Rel8!