Skip to content

Commit f163ba5

Browse files
committed
update go sdk sort of
1 parent 93970a5 commit f163ba5

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

app/data_client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ func (d *DataClient) TabularDataBySQL(ctx context.Context, organizationID, sqlQu
438438

439439
// TabularDataByMQL queries tabular data with MQL (MongoDB Query Language) queries.
440440
func (d *DataClient) TabularDataByMQL(
441-
ctx context.Context, organizationID string, query []map[string]interface{},
441+
ctx context.Context, organizationID string, query []map[string]interface{}, useRecentData bool,
442442
) ([]map[string]interface{}, error) {
443443
mqlBinary := [][]byte{}
444444
for _, q := range query {
@@ -452,6 +452,7 @@ func (d *DataClient) TabularDataByMQL(
452452
resp, err := d.dataClient.TabularDataByMQL(ctx, &pb.TabularDataByMQLRequest{
453453
OrganizationId: organizationID,
454454
MqlBinary: mqlBinary,
455+
UseRecentData: &useRecentData,
455456
})
456457
if err != nil {
457458
return nil, err

app/data_client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ func TestDataClient(t *testing.T) {
361361
RawData: expectedRawDataPb,
362362
}, nil
363363
}
364-
response, err := client.TabularDataByMQL(context.Background(), organizationID, mqlQueries)
364+
response, err := client.TabularDataByMQL(context.Background(), organizationID, mqlQueries, false)
365365
test.That(t, err, test.ShouldBeNil)
366366
test.That(t, response, test.ShouldResemble, rawData)
367367
})

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ require (
7575
go.uber.org/atomic v1.11.0
7676
go.uber.org/multierr v1.11.0
7777
go.uber.org/zap v1.27.0
78-
go.viam.com/api v0.1.380
78+
go.viam.com/api v0.1.381
7979
go.viam.com/test v1.2.4
8080
go.viam.com/utils v0.1.123
8181
goji.io v2.0.2+incompatible

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
15151515
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
15161516
go.viam.com/api v0.1.380 h1:VgRHDlPBku+kjIp4omxmPNmRVZezytFUUOFJ2xpRFR8=
15171517
go.viam.com/api v0.1.380/go.mod h1:g5eipXHNm0rQmW7DWya6avKcmzoypLmxnMlAaIsE5Ls=
1518+
go.viam.com/api v0.1.381 h1:wwaRb3w6CFOWuW4eSZyIswlVBPWFlRX7yrtIV5Rg+zg=
1519+
go.viam.com/api v0.1.381/go.mod h1:g5eipXHNm0rQmW7DWya6avKcmzoypLmxnMlAaIsE5Ls=
15181520
go.viam.com/test v1.2.4 h1:JYgZhsuGAQ8sL9jWkziAXN9VJJiKbjoi9BsO33TW3ug=
15191521
go.viam.com/test v1.2.4/go.mod h1:zI2xzosHdqXAJ/kFqcN+OIF78kQuTV2nIhGZ8EzvaJI=
15201522
go.viam.com/utils v0.1.123 h1:0nxG3Rp9MmFn+qFbPQ4qSptz+hvm9MENbPXvKUBgRqU=

0 commit comments

Comments
 (0)