Idris2Doc : Postgres.Data.PostgresValue

Postgres.Data.PostgresValue

(source)

Definitions

data PValue : PType -> Type
Totality: total
Visibility: public export
Constructor: 
Raw : String -> PValue p

Hints:
Cast (PValue PString) String
Monoid (PValue p)
Semigroup (PValue p)
rawString : PValue t -> String
Visibility: export
interface IdrCast : PType -> Type -> Type
  Represents an ability to cast a Postgres type of value (pt) to
a particular Idris type (ty).
@param pt A Postgres type to cast from.
@param ty An Idris type to cast to.

Parameters: pt, ty
Methods:
toIdris : PValue pt -> Maybe ty

Implementations:
IdrCast PInteger Int
IdrCast PInteger Integer
IdrCast PInteger Double
IdrCast PDouble Double
IdrCast PChar Char
IdrCast PBoolean Bool
IdrCast PString String
IdrCast PJson JSON
IdrCast POid Integer
IdrCast from to => IdrCast (PArray from) (List to)
toIdris : IdrCast pt ty => PValue pt -> Maybe ty
Visibility: public export
interface PGCast : PType -> Type -> Type
Parameters: pt, ty
Methods:
toPostgres : ty -> PValue pt

Implementations:
PGCast PInteger Int
PGCast PInteger Integer
PGCast PInteger Nat
PGCast PDouble Double
PGCast PDouble Integer
PGCast PDouble Int
PGCast PChar Char
PGCast PBoolean Bool
PGCast PString String
PGCast PJson JSON
PGCast POid Integer
PGCast to from => PGCast (PArray to) (List from)
PGCast to (Maybe from) => PGCast to from
toPostgres : PGCast pt ty => ty -> PValue pt
Visibility: public export
interface DBStringCast : Type -> Type
Parameters: a
Methods:
dbCast : String -> Either String a
  Cast the string representation of a database value to
the given Idris type if possible or provide an error
message.

Implementations:
DBStringCast Integer
DBStringCast Double
DBStringCast Char
DBStringCast Bool
DBStringCast String
DBStringCast JSON
DBStringCast a => DBStringCast (List a)
dbCast : DBStringCast a => String -> Either String a
  Cast the string representation of a database value to
the given Idris type if possible or provide an error
message.

Visibility: export
data Castable : Type -> Type
Totality: total
Visibility: public export
Constructors:
Cast : DBStringCast ty => Castable ty
CastMaybe : DBStringCast ty => Castable (Maybe ty)
asDefaultType : Castable t -> Maybe String -> Either String t
  Turn the string coming from Postgres into its default Idris type.

You can create your own `DBStringCast` implementations if you wish to
be able to parse additional types using this library's builtin functions.

Visibility: public export