elasticsearch-interchange 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+7/−8 lines, 3 filesdep ~primitivePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: primitive
API changes (from Hackage documentation)
- Elasticsearch.Bulk.Request: Operation :: !Action -> {-# UNPACK #-} !ShortText -> {-# UNPACK #-} !MaybeShortText -> !Value -> Operation
+ Elasticsearch.Bulk.Request: Operation :: !Action -> {-# UNPACK #-} !ShortText -> {-# UNPACK #-} !MaybeShortText -> !SmallArray Member -> Operation
- Elasticsearch.Bulk.Request: [$sel:document:Operation] :: Operation -> !Value
+ Elasticsearch.Bulk.Request: [$sel:document:Operation] :: Operation -> !SmallArray Member
Files
elasticsearch-interchange.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: elasticsearch-interchange-version: 0.1.0.0+version: 0.2.0.0 synopsis: Serialization of Elasticsearch requests and responses description: This library provides data types for communicating with elasticsearch. It@@ -40,7 +40,7 @@ , bytebuild >=0.3.7 && <0.4 , json-query >=0.2.1 && <0.3 , json-syntax >=0.2 && <0.3- , primitive >=0.7.1 && <0.8+ , primitive >=0.7.1 && <0.10 , text-short >=0.1.3 && <0.2 , unpacked-maybe-text >=0.1 && <0.2
src/Elasticsearch/Bulk/Request.hs view
@@ -28,7 +28,7 @@ -- ^ Index name, required , id_ :: {-# UNPACK #-} !M.MaybeShortText -- ^ Document ID, optional but strongly recommended.- , document :: !Json.Value+ , document :: !(SmallArray Json.Member) -- ^ Document } deriving (Show) @@ -61,7 +61,7 @@ <> Builder.shortTextJsonString t ) id_ <> Builder.ascii3 '}' '}' '\n'- <> Json.encode document+ <> Json.encode (Json.Object document) <> Builder.ascii '\n' -- When we encode the first part of the operation, we are trying to@@ -134,5 +134,5 @@ (encodeSmileActionWithoutDocId action index) (encodeSmileAction action index) id_- <> Json.Smile.encode document+ <> Json.Smile.encode (Json.Object document) <> Builder.word8 0xFF
test/Main.hs view
@@ -92,14 +92,13 @@ { action = Index , index = "person-2018.09.28" , id_ = M.just "5bc6d38e-8b30-11eb-8dcd-0242ac130003"- , document = Json.emptyObject+ , document = mempty } , Operation { action = Create , index = "person-2018.09.29" , id_ = M.just "3cd512c8-8b31-11eb-8dcd-0242ac130003"- , document = Json.Object- (Exts.fromList ["name" :-> Json.String "Xavier"])+ , document = Exts.fromList ["name" :-> Json.String "Xavier"] } ] ]