Module

Data.Postgres

Package
purescript-postgresql
Repository
cakekindel/purescript-postgresql

#JSON Source

newtype JSON a

Newtype hinting that this value should be serialized / deserialized as a JSON string.

Constructors

Instances

#modifyPgTypes Source

modifyPgTypes :: Effect Unit

This mutates import('pg').types, setting deserialization for some types to unmarshal as strings rather than JS values.

#isInstanceOfBuffer Source

#isInstanceOfInterval Source

#RepT Source

type RepT = ExceptT (NonEmptyList ForeignError) Effect

The serialization & deserialization monad.

#smash Source

smash :: forall a. RepT a -> Effect a

Flatten to an Effect, showing errors

#Serialize Source

class Serialize a  where

Serialize data of type a to a Raw SQL value.

Members

Instances

#Deserialize Source

class Deserialize a  where

Deserialize data of type a from a Raw SQL value.

Members

Instances

#Rep Source

class (Serialize a, Deserialize a) <= Rep a 

A type which is Representable as a SQL value.

Instances

#unsafeSerializeCoerce Source

unsafeSerializeCoerce :: forall m a. Monad m => a -> m Raw

Coerces the value to Raw.

This is only safe for values whose javascript representation can be directly serialized by node-postgres to the corresponding SQL type.