Module
Node.SQLite.Decoding
- Package
- purescript-node-sqlite
- Repository
- m-rinaldi/purescript-node-sqlite
#Error Source
type Error = NonEmptyList ForeignError#DecodeFields Source
class DecodeFields :: RowList Type -> Row Type -> Constraintclass DecodeFields (rl :: RowList Type) (row :: Row Type) | rl -> row where
Internal. RowList traversal behind the Decode instances.
Members
decodeFields :: forall m. Monad m => Proxy rl -> Foreign -> ExceptT Error m (Builder (Record ()) (Record row))
Instances
DecodeFields Nil ()(DecodeFields tail tailRow, IsSymbol name, Lacks name tailRow, Cons name ty tailRow row, DecodeValue ty) => DecodeFields (Cons name ty tail) row
#DecodeValue Source
class DecodeValue (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
decodeValue :: forall m. Monad m => Foreign -> ExceptT Error m v
Instances
(DecodeNonNullableValue v) => DecodeValue (Maybe v)(DecodeNonNullableValue v) => DecodeValue v
#DecodeNonNullableValue Source
class DecodeNonNullableValue (v :: Type) whereExtension point. Decodes a single SQL value that is never NULL into a
PureScript type. Add an instance to make a type usable as a column,
directly or wrapped in Maybe.
Members
decodeNonNullableValue :: forall m. Monad m => Foreign -> ExceptT Error m v