From 76e7e3c02f7346488903c532393f6bcb6e04fd27 Mon Sep 17 00:00:00 2001 From: Jinghan Ying Date: Mon, 8 Nov 2021 10:59:26 +0800 Subject: [PATCH] feat(pkg/oomstore): add Revision to API ImportBatchFeatures --- pkg/oomstore/import.go | 2 ++ pkg/oomstore/types/options.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/oomstore/import.go b/pkg/oomstore/import.go index fc568fa39..f2e0d15bb 100644 --- a/pkg/oomstore/import.go +++ b/pkg/oomstore/import.go @@ -79,6 +79,7 @@ func (s *OomStore) ImportBatchFeatures(ctx context.Context, opt types.ImportBatc Entity: entity, Features: features, Header: header, + Revision: opt.Revision, CsvReader: csvReader, }) if err != nil { @@ -90,5 +91,6 @@ func (s *OomStore) ImportBatchFeatures(ctx context.Context, opt types.ImportBatc GroupName: opt.GroupName, DataTable: dataTable, Description: opt.Description, + Anchored: opt.Revision != nil, }) } diff --git a/pkg/oomstore/types/options.go b/pkg/oomstore/types/options.go index af33979df..b9407cea0 100644 --- a/pkg/oomstore/types/options.go +++ b/pkg/oomstore/types/options.go @@ -43,6 +43,7 @@ type ImportBatchFeaturesOpt struct { GroupName string Description string DataSource CsvDataSource + Revision *int64 } type CsvDataSource struct {