Module

Droplet.Language.Internal.Function

Package
purescript-droplet
Repository
easafe/purescript-droplet

#TextColumn Source

class TextColumn (t :: Type) 

Extra class for clearer error messages

Instances

#count Source

count :: forall f fields. ToCount f fields => f -> Aggregate f E fields BigInt

#ToCount Source

class ToCount :: Type -> Row Type -> Constraintclass ToCount (f :: Type) (fields :: Row Type) | f -> fields

Instances

#Aggregate Source

data Aggregate :: Type -> Type -> Row Type -> Type -> Typedata Aggregate input rest (fields :: Row Type) (output :: Type)

Built-in aggregate functions

Constructors

#function' Source

function' :: forall output. String -> FunctionSignature' output

Represents a function that takes no arguments

#string_agg Source

string_agg :: forall f rest fields. ToStringAgg f rest fields => f -> rest -> Aggregate f rest fields (Maybe String)

#ToStringAgg Source

class ToStringAgg :: Type -> Type -> Row Type -> Constraintclass ToStringAgg (f :: Type) (rest :: Type) (fields :: Row Type) | f -> fields

Instances

#ToArrayAgg Source

class ToArrayAgg :: Type -> Row Type -> Type -> Constraintclass ToArrayAgg (f :: Type) (fields :: Row Type) (t :: Type) | f -> fields t

Instances

#ToCoalesce Source

class ToCoalesce :: Type -> Row Type -> Type -> Constraintclass ToCoalesce (a :: Type) (fields :: Row Type) (t :: Type) | a -> t

coalesce arguments must be of same type

Instances

#PgFunction Source

data PgFunction :: Type -> Type -> Row Type -> Type -> Typedata PgFunction (input :: Type) args (fields :: Row Type) (output :: Type)

Declares a functions

Constructors

Instances

#array_agg Source

array_agg :: forall f t fields. ToArrayAgg f fields t => f -> Aggregate f E fields (Maybe (Array t))

#MatchArgument Source

class MatchArgument :: Type -> Row Type -> Type -> Constraintclass MatchArgument (a :: Type) (fields :: Row Type) (t :: Type) | a -> t

Instances

#function Source

function :: forall input output. String -> FunctionSignature input output

Represents a function that takes arguments

#MatchArgumentList Source

class MatchArgumentList :: Type -> Type -> Row Type -> Constraintclass MatchArgumentList (input :: Type) (args :: Type) (fields :: Row Type) 

Function arguments must match input type

Instances

#FunctionSignature Source

type FunctionSignature input output = forall args fields. MatchArgumentList input args fields => args -> PgFunction input args fields output

#FunctionSignature' Source

type FunctionSignature' output = forall fields. PgFunction Void Unit fields output

#coalesce Source

coalesce :: forall input output fields. ToCoalesce input fields output => input -> PgFunction input input fields (Maybe output)