Skip to content

Commit fda8311

Browse files
upgrade json-as to 1.0.8
- wasmx-as-contracts commit b9419d760d23fc8ca27344c2d3c925413b777015
1 parent db2c671 commit fda8311

10 files changed

Lines changed: 6 additions & 7 deletions

File tree

159 Bytes
Binary file not shown.
153 Bytes
Binary file not shown.
-511 Bytes
Binary file not shown.
-495 Bytes
Binary file not shown.
-1.42 KB
Binary file not shown.
-2.33 KB
Binary file not shown.

tests/vmsql/dtype_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ func (suite *KeeperTestSuite) TestDTypeContract() {
240240
suite.Require().Equal(1, len(table2rows))
241241

242242
// readField
243-
cmd = &vmsql.CalldataDType{ReadField: &vmsql.ReadFieldRequest{Identifier: vmsql.TableIdentifier{
243+
cmd = &vmsql.CalldataDType{ReadFields: &vmsql.ReadFieldsRequest{Identifier: vmsql.TableIdentifier{
244244
DbConnectionId: identif.DbConnectionId,
245245
DbId: identif.DbId,
246246
TableId: tableId2,
247247
},
248-
FieldName: "table1_id",
249-
Data: []byte(`{"id":1}`),
248+
Fields: []string{"table1_id"},
249+
Data: []byte(`{"id":1}`),
250250
}}
251251
data, err = json.Marshal(cmd)
252252
suite.Require().NoError(err)
33 Bytes
Binary file not shown.
234 Bytes
Binary file not shown.

wasmx/x/vmsql/types_dtype.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,9 @@ type ReadDTypeRequest struct {
7575
Data []byte `json:"data"`
7676
}
7777

78-
type ReadFieldRequest struct {
78+
type ReadFieldsRequest struct {
7979
Identifier TableIdentifier `json:"identifier"`
80-
FieldId int64 `json:"fieldId"`
81-
FieldName string `json:"fieldName"`
80+
Fields []string `json:"fields"`
8281
Data []byte `json:"data"`
8382
}
8483

@@ -113,6 +112,6 @@ type CalldataDType struct {
113112
Update *UpdateDTypeRequest `json:"Update,omitempty"`
114113
Delete *DeleteDTypeRequest `json:"Delete,omitempty"`
115114
Read *ReadDTypeRequest `json:"Read,omitempty"`
116-
ReadField *ReadFieldRequest `json:"ReadField,omitempty"`
115+
ReadFields *ReadFieldsRequest `json:"ReadFields,omitempty"`
117116
BuildSchema *BuildSchemaRequest `json:"BuildSchema,omitempty"`
118117
}

0 commit comments

Comments
 (0)