@@ -124,7 +124,8 @@ class ChaincodeStubInterface ccs where
124124 -- Call Close() on the returned StateQueryIteratorInterface object when done.
125125 -- The query is re-executed during validation phase to ensure result set
126126 -- has not changed since transaction endorsement (phantom reads detected).
127- -- getStateByPartialCompositeKey :: ccs -> String -> [String] -> Either Error StateQueryIterator
127+ getStateByPartialCompositeKey :: ccs -> Text -> [Text ] -> ExceptT Error IO StateQueryIterator
128+
128129 -- GetStateByPartialCompositeKeyWithPagination queries the state in the ledger based on
129130 -- a given partial composite key. This function returns an iterator
130131 -- which can be used to iterate over the composite keys whose
@@ -143,18 +144,22 @@ class ChaincodeStubInterface ccs where
143144 -- code point). See related functions SplitCompositeKey and CreateCompositeKey.
144145 -- Call Close() on the returned StateQueryIteratorInterface object when done.
145146 -- This call is only supported in a read only transaction.
146- -- getStateByPartialCompositeKeyWithPagination :: ccs -> String -> [String] -> Int32 -> String -> Either Error (StateQueryIterator, Pb.QueryResponseMetadata)
147+ getStateByPartialCompositeKeyWithPagination
148+ :: ccs -> Text -> [Text ] -> Int -> Text -> ExceptT Error IO (StateQueryIterator , Pb. QueryResponseMetadata )
149+
147150 -- CreateCompositeKey combines the given `attributes` to form a composite
148151 -- key. The objectType and attributes are expected to have only valid utf8
149152 -- strings and should not contain U+0000 (nil byte) and U+10FFFF
150153 -- (biggest and unallocated code point).
151154 -- The resulting composite key can be used as the key in PutState().
152- -- createCompositeKey :: ccs -> String -> [String] -> Either Error String
155+ createCompositeKey :: ccs -> Text -> [Text ] -> Either Error Text
156+
153157 -- SplitCompositeKey splits the specified key into attributes on which the
154158 -- composite key was formed. Composite keys found during range queries
155159 -- or partial composite key queries can therefore be split into their
156160 -- composite parts.
157- -- splitCompositeKey :: ccs -> String -> Either Error (String, [String])
161+ splitCompositeKey :: ccs -> Text -> Either Error (Text , [Text ])
162+
158163 -- GetQueryResult performs a "rich" query against a state database. It is
159164 -- only supported for state databases that support rich query,
160165 -- e.g.CouchDB. The query string is in the native syntax
@@ -170,7 +175,8 @@ class ChaincodeStubInterface ccs where
170175 -- be detected at validation/commit time. Applications susceptible to this
171176 -- should therefore not use GetQueryResult as part of transactions that update
172177 -- ledger, and should limit use to read-only chaincode operations.
173- -- getQueryResult :: ccs -> String -> Either Error StateQueryIterator
178+ getQueryResult :: ccs -> Text -> ExceptT Error IO StateQueryIterator
179+
174180 -- GetQueryResultWithPagination performs a "rich" query against a state database.
175181 -- It is only supported for state databases that support rich query,
176182 -- e.g., CouchDB. The query string is in the native syntax
@@ -184,7 +190,9 @@ class ChaincodeStubInterface ccs where
184190 -- can be used as a value to the bookmark argument. Otherwise, an empty string
185191 -- must be passed as bookmark.
186192 -- This call is only supported in a read only transaction.
187- -- getQueryResultWithPagination :: ccs -> String -> Int32 -> String -> Either Error (StateQueryIterator, Pb.QueryResponseMetadata)
193+ getQueryResultWithPagination
194+ :: ccs -> Text -> Int -> Text -> ExceptT Error IO (StateQueryIterator , Pb. QueryResponseMetadata )
195+
188196 -- GetHistoryForKey returns a history of key values across time.
189197 -- For each historic key update, the historic value and associated
190198 -- transaction id and timestamp are returned. The timestamp is the
@@ -197,7 +205,9 @@ class ChaincodeStubInterface ccs where
197205 -- detected at validation/commit time. Applications susceptible to this
198206 -- should therefore not use GetHistoryForKey as part of transactions that
199207 -- update ledger, and should limit use to read-only chaincode operations.
200- -- getHistoryForKey :: ccs -> Either Error HistoryQueryIterator
208+ -- TODO: value should be HistoryQueryIterator
209+ getHistoryForKey :: ccs -> Text -> ExceptT Error IO StateQueryIterator
210+
201211 -- GetPrivateData returns the value of the specified `key` from the specified
202212 -- `collection`. Note that GetPrivateData doesn't read data from the
203213 -- private writeset, which has not been committed to the `collection`. In
0 commit comments