Data.Postgres
- Package
- purescript-postgresql
- Repository
- cakekindel/purescript-postgresql
#JSON Source
newtype JSON aNewtype hinting that this value should be serialized / deserialized as a JSON string.
Constructors
JSON a
Instances
Newtype (JSON a) _(Show a) => Show (JSON a)(Eq a) => Eq (JSON a)(Ord a) => Ord (JSON a)(WriteForeign a) => WriteForeign (JSON a)(ReadForeign a) => ReadForeign (JSON a)(WriteForeign a) => Serialize (JSON a)(ReadForeign a) => Deserialize (JSON a)json,jsonb
#modifyPgTypes Source
modifyPgTypes :: Effect UnitThis mutates import('pg').types, setting deserialization
for some types to unmarshal as strings rather than JS values.
#isInstanceOfBuffer Source
isInstanceOfBuffer :: Foreign -> Boolean#RepT Source
type RepT = ExceptT (NonEmptyList ForeignError) EffectThe serialization & deserialization monad.
#Serialize Source
class Serialize a whereSerialize data of type a to a Raw SQL value.
Members
Instances
Serialize RawSerialize UnitNULLSerialize NullNULL(WriteForeign a) => Serialize (JSON a)json,jsonbSerialize BufferbyteaSerialize Intint2,int4Serialize BigIntint8Serialize BooleanboolSerialize Stringtext,inet,tsquery,tsvector,uuid,xml,cidr,time,timetzSerialize Numberfloat4,float8Serialize DateTimeintervalSerialize IntervalintervalSerialize MillisecondsintervalSerialize SecondsintervalSerialize MinutesintervalSerialize HoursintervalSerialize DaysintervalSerialize Instanttimestamp,timestamptz(Serialize a) => Serialize (Maybe a)Just->a,Nothing->NULL(Serialize a) => Serialize (Array a)postgres
array(Ord a, Rep a) => Serialize (Range a)
#Deserialize Source
class Deserialize a whereDeserialize data of type a from a Raw SQL value.
Members
deserialize :: Raw -> RepT a
Instances
Deserialize RawDeserialize UnitNULL(always succeeds)Deserialize NullNULL(fails if non-null)(ReadForeign a) => Deserialize (JSON a)json,jsonbDeserialize BufferbyteaDeserialize IntervalintervalDeserialize MillisecondsintervalDeserialize SecondsintervalDeserialize MinutesintervalDeserialize HoursintervalDeserialize DaysintervalDeserialize Intint2,int4Deserialize BigIntint8Deserialize BooleanboolDeserialize Stringtext,inet,tsquery,tsvector,uuid,xml,cidr,time,timetzDeserialize Numberfloat4,float8Deserialize DateTimetimestamp,timestamptzDeserialize Instanttimestamp,timestamptz(Deserialize a) => Deserialize (Array a)postgres
array(Deserialize a) => Deserialize (Maybe a)non-NULL ->
Just, NULL ->Nothing(Ord a, Rep a) => Deserialize (Range a)
#Rep Source
class (Serialize a, Deserialize a) <= Rep a A type which is Representable as a SQL value.
Instances
(Serialize a, Deserialize a) => Rep a
#unsafeSerializeCoerce Source
unsafeSerializeCoerce :: forall m a. Monad m => a -> m RawCoerces 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.
- Modules
- Control.
Monad. Postgres - Control.
Monad. Postgres. Base - Control.
Monad. Postgres. Cursor - Control.
Monad. Postgres. Session - Data.
Postgres - Data.
Postgres. Custom - Data.
Postgres. Custom. Enum - Data.
Postgres. Interval - Data.
Postgres. Query - Data.
Postgres. Query. Builder - Data.
Postgres. Range - Data.
Postgres. Raw - Data.
Postgres. Result - Data.
Postgres. Unresult - Effect.
Aff. Postgres. Client - Effect.
Aff. Postgres. Pool - Effect.
Postgres. Client - Effect.
Postgres. Error - Effect.
Postgres. Error. Common - Effect.
Postgres. Error. Except - Effect.
Postgres. Error. RE - Effect.
Postgres. Pool - Node.
FS. PinnedVersion - Pipes.
Postgres
json,jsonb