@@ -69,45 +69,17 @@ type ChaincodeStubInterface interface {
69
69
// returned by the iterator is random.
70
70
RangeQueryState (startKey , endKey string ) (StateRangeQueryIteratorInterface , error )
71
71
72
- // CreateTable creates a new table given the table name and column definitions
73
- CreateTable (name string , columnDefinitions []* ColumnDefinition ) error
74
-
75
- // GetTable returns the table for the specified table name or ErrTableNotFound
76
- // if the table does not exist.
77
- GetTable (tableName string ) (* Table , error )
78
-
79
- // DeleteTable deletes an entire table and all associated rows.
80
- DeleteTable (tableName string ) error
81
-
82
- // InsertRow inserts a new row into the specified table.
83
- // Returns -
84
- // true and no error if the row is successfully inserted.
85
- // false and no error if a row already exists for the given key.
86
- // false and a TableNotFoundError if the specified table name does not exist.
87
- // false and an error if there is an unexpected error condition.
88
- InsertRow (tableName string , row Row ) (bool , error )
89
-
90
- // ReplaceRow updates the row in the specified table.
91
- // Returns -
92
- // true and no error if the row is successfully updated.
93
- // false and no error if a row does not exist the given key.
94
- // flase and a TableNotFoundError if the specified table name does not exist.
95
- // false and an error if there is an unexpected error condition.
96
- ReplaceRow (tableName string , row Row ) (bool , error )
97
-
98
- // GetRow fetches a row from the specified table for the given key.
99
- GetRow (tableName string , key []Column ) (Row , error )
100
-
101
- // GetRows returns multiple rows based on a partial key. For example, given table
102
- // | A | B | C | D |
103
- // where A, C and D are keys, GetRows can be called with [A, C] to return
104
- // all rows that have A, C and any value for D as their key. GetRows could
105
- // also be called with A only to return all rows that have A and any value
106
- // for C and D as their key.
107
- GetRows (tableName string , key []Column ) (<- chan Row , error )
108
-
109
- // DeleteRow deletes the row for the given key from the specified table.
110
- DeleteRow (tableName string , key []Column ) error
72
+ //PartialCompositeKeyQuery function can be invoked by a chaincode to query the
73
+ //state based on a given partial composite key. This function returns an
74
+ //iterator which can be used to iterate over all composite keys whose prefix
75
+ //matches the given partial composite key. This function should be used only for
76
+ //a partial composite key. For a full composite key, an iter with empty response
77
+ //would be returned.
78
+ PartialCompositeKeyQuery (objectType string , keys []string ) (StateRangeQueryIteratorInterface , error )
79
+
80
+ //Given a list of attributes, createCompundKey function combines these attributes
81
+ //to form a composite key.
82
+ CreateCompositeKey (objectType string , attributes []string ) (string , error )
111
83
112
84
// GetCallerCertificate returns caller certificate
113
85
GetCallerCertificate () ([]byte , error )
0 commit comments