diff --git a/app/data_client.go b/app/data_client.go index 12a470d7f12..c34b7ffb90c 100644 --- a/app/data_client.go +++ b/app/data_client.go @@ -438,7 +438,7 @@ func (d *DataClient) TabularDataBySQL(ctx context.Context, organizationID, sqlQu // TabularDataByMQL queries tabular data with MQL (MongoDB Query Language) queries. func (d *DataClient) TabularDataByMQL( - ctx context.Context, organizationID string, query []map[string]interface{}, + ctx context.Context, organizationID string, query []map[string]interface{}, useRecentData bool, ) ([]map[string]interface{}, error) { mqlBinary := [][]byte{} for _, q := range query { @@ -452,6 +452,7 @@ func (d *DataClient) TabularDataByMQL( resp, err := d.dataClient.TabularDataByMQL(ctx, &pb.TabularDataByMQLRequest{ OrganizationId: organizationID, MqlBinary: mqlBinary, + UseRecentData: &useRecentData, }) if err != nil { return nil, err diff --git a/app/data_client_test.go b/app/data_client_test.go index b5fa0e4b42f..f13a470c751 100644 --- a/app/data_client_test.go +++ b/app/data_client_test.go @@ -361,7 +361,7 @@ func TestDataClient(t *testing.T) { RawData: expectedRawDataPb, }, nil } - response, err := client.TabularDataByMQL(context.Background(), organizationID, mqlQueries) + response, err := client.TabularDataByMQL(context.Background(), organizationID, mqlQueries, false) test.That(t, err, test.ShouldBeNil) test.That(t, response, test.ShouldResemble, rawData) }) diff --git a/go.mod b/go.mod index af34b1db056..12ea52a28a9 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - go.viam.com/api v0.1.380 + go.viam.com/api v0.1.381 go.viam.com/test v1.2.4 go.viam.com/utils v0.1.123 goji.io v2.0.2+incompatible diff --git a/go.sum b/go.sum index 6742b252f1a..22106420893 100644 --- a/go.sum +++ b/go.sum @@ -1515,6 +1515,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.viam.com/api v0.1.380 h1:VgRHDlPBku+kjIp4omxmPNmRVZezytFUUOFJ2xpRFR8= go.viam.com/api v0.1.380/go.mod h1:g5eipXHNm0rQmW7DWya6avKcmzoypLmxnMlAaIsE5Ls= +go.viam.com/api v0.1.381 h1:wwaRb3w6CFOWuW4eSZyIswlVBPWFlRX7yrtIV5Rg+zg= +go.viam.com/api v0.1.381/go.mod h1:g5eipXHNm0rQmW7DWya6avKcmzoypLmxnMlAaIsE5Ls= go.viam.com/test v1.2.4 h1:JYgZhsuGAQ8sL9jWkziAXN9VJJiKbjoi9BsO33TW3ug= go.viam.com/test v1.2.4/go.mod h1:zI2xzosHdqXAJ/kFqcN+OIF78kQuTV2nIhGZ8EzvaJI= go.viam.com/utils v0.1.123 h1:0nxG3Rp9MmFn+qFbPQ4qSptz+hvm9MENbPXvKUBgRqU=