Module
Node.SQLite.Encoding
- Package
- purescript-node-sqlite
- Repository
- m-rinaldi/purescript-node-sqlite
#EncodedRecord Source
newtype EncodedRecord#Encode Source
class Encode (v :: Type) whereMembers
encode :: v -> EncodedRecord
Instances
(RowToList r rl, EncodeFields rl r er) => Encode (Record r)
#EncodeFields Source
class EncodeFields :: RowList Type -> Row Type -> Row Type -> Constraintclass EncodeFields (rl :: RowList Type) (r :: Row Type) (encoded :: Row Type) | rl -> r encoded where
Internal. RowList traversal behind the Encode (Record r) instance.
Members
Instances
EncodeFields Nil () ()(IsSymbol name, EncodeValue ty, EncodeFields tail tailR encodedTailR, Lacks name tailR, Lacks name encodedTailR, Cons name ty tailR r, Cons name EncodedValue encodedTailR encodedR) => EncodeFields (Cons name ty tail) r encodedR
#EncodeValue Source
class EncodeValue (v :: Type) whereOne SQL value, NULL allowed. Not an extension point: the fallback
instance below overlaps with any instance written elsewhere, so nullability
is expressed by wrapping in Maybe.
Members
encodeValue :: v -> EncodedValue
Instances
(EncodeNonNullableValue v) => EncodeValue (Maybe v)(EncodeNonNullableValue v) => EncodeValue v
#EncodeNonNullableValue Source
class EncodeNonNullableValue (v :: Type) whereExtension point. Encodes a PureScript type as a single SQL value that is
never NULL. Add an instance to make a type usable as a column, directly
or wrapped in Maybe.
Members
encodeNonNullableValue :: v -> EncodedValue