mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-30 00:55:22 +03:00
Ditch foldableDimension
This commit is contained in:
parent
db4261ddb5
commit
a1ead0ed62
@ -45,7 +45,6 @@ module Hasql.Encoders
|
|||||||
Array,
|
Array,
|
||||||
element,
|
element,
|
||||||
dimension,
|
dimension,
|
||||||
foldableDimension,
|
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ Here's an example of its usage:
|
|||||||
|
|
||||||
@
|
@
|
||||||
someParamsEncoder :: 'Params' [[Int64]]
|
someParamsEncoder :: 'Params' [[Int64]]
|
||||||
someParamsEncoder = 'param' ('nonNullable' ('array' ('foldableDimension' ('foldableDimension' ('element' ('nonNullable' 'int8'))))))
|
someParamsEncoder = 'param' ('nonNullable' ('array' ('dimension' 'foldl'' ('dimension' 'foldl'' ('element' ('nonNullable' 'int8'))))))
|
||||||
@
|
@
|
||||||
|
|
||||||
Please note that the PostgreSQL __IN__ keyword does not accept an array, but rather a syntactical list of
|
Please note that the PostgreSQL __IN__ keyword does not accept an array, but rather a syntactical list of
|
||||||
@ -345,11 +345,3 @@ which determines the input value.
|
|||||||
{-# INLINABLE dimension #-}
|
{-# INLINABLE dimension #-}
|
||||||
dimension :: (forall a. (a -> b -> a) -> a -> c -> a) -> Array b -> Array c
|
dimension :: (forall a. (a -> b -> a) -> a -> c -> a) -> Array b -> Array c
|
||||||
dimension foldl (Array imp) = Array (Array.dimension foldl imp)
|
dimension foldl (Array imp) = Array (Array.dimension foldl imp)
|
||||||
|
|
||||||
{-|
|
|
||||||
Same as 'dimension', but specialized to 'Foldable' values,
|
|
||||||
which includes such structures as list and 'Vector'.
|
|
||||||
-}
|
|
||||||
{-# INLINE foldableDimension #-}
|
|
||||||
foldableDimension :: Foldable foldable => Array a -> Array (foldable a)
|
|
||||||
foldableDimension = dimension foldl'
|
|
||||||
|
@ -22,7 +22,7 @@ module Hasql.Statement
|
|||||||
-- Encoders.'Encoders.param' .
|
-- Encoders.'Encoders.param' .
|
||||||
-- Encoders.'Encoders.nonNullable' .
|
-- Encoders.'Encoders.nonNullable' .
|
||||||
-- Encoders.'Encoders.array' .
|
-- Encoders.'Encoders.array' .
|
||||||
-- Encoders.'Encoders.foldableDimension' .
|
-- Encoders.'Encoders.dimension' 'foldl'' .
|
||||||
-- Encoders.'Encoders.element' .
|
-- Encoders.'Encoders.element' .
|
||||||
-- Encoders.'Encoders.nonNullable'
|
-- Encoders.'Encoders.nonNullable'
|
||||||
-- decoder = Decoders.'Decoders.noResult'
|
-- decoder = Decoders.'Decoders.noResult'
|
||||||
|
Loading…
Reference in New Issue
Block a user