This repository was archived by the owner on Apr 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,8 @@ generateResultBytes sqi text = do
188188 hasNextBool <- hasNext sqi
189189 if hasNextBool then do
190190 eeKV <- next sqi
191+ -- TODO: We need to check that the Either Error KV returned from next
192+ -- is correct and append the showable version of KVs instead of "abc".
191193 generateResultBytes sqi (append text " abc" )
192194 else pure $ Right $ TSE. encodeUtf8 text
193195
Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ class ChaincodeStubInterface ccs where
3737 -- setStateValidationParameter :: ccs -> String -> [ByteString] -> Maybe Error
3838 -- getStateValiationParameter :: ccs -> String -> Either Error [ByteString]
3939 getStateByRange :: ccs -> Text -> Text -> IO (Either Error StateQueryIterator )
40+
41+ -- TODO: We need to implement this so we can test the fetchNextQueryResult functionality
4042 -- getStateByRangeWithPagination :: ccs -> String -> String -> Int32 -> String -> Either Error (StateQueryIterator, Pb.QueryResponseMetadata)
43+
4144 -- getStateByPartialCompositeKey :: ccs -> String -> [String] -> Either Error StateQueryIterator
4245 -- getStateByPartialCompositeKeyWithPagination :: ccs -> String -> [String] -> Int32 -> String -> Either Error (StateQueryIterator, Pb.QueryResponseMetadata)
4346 -- createCompositeKey :: ccs -> String -> [String] -> Either Error String
@@ -72,6 +75,8 @@ class StateQueryIteratorInterface sqi where
7275-- -- close terminantes the iteration.
7376 close :: sqi -> IO (Maybe Error )
7477-- -- Provides the next key-value pair pointed by the iterator
78+ -- TODO: Change this to an ExceptT type to make handling the next function
79+ -- easier on the user chaincode side
7580 next :: sqi -> IO (Either Error Pb. KV )
7681
7782-- The type class HistoryQueryIterator defines the behaviour of the types that expose functionalities
You can’t perform that action at this time.
0 commit comments