Collection.h 589 字节
Newer Older
1 2
#pragma once

B
bigsheeper 已提交
3
#include "dog_segment/Partition.h"
4 5
#include "SegmentDefs.h"

6 7
namespace milvus::dog_segment {

8 9
class Collection {
public:
B
bigsheeper 已提交
10
    explicit Collection(std::string &collection_name, std::string &schema);
11 12

    // TODO: set index
B
bigsheeper 已提交
13
    void set_index();
14

B
bigsheeper 已提交
15 16
    // TODO: config to schema
    void parse();
17

18 19 20 21
public:
    SchemaPtr& get_schema() {
      return schema_;
    }
22 23

private:
24 25 26 27
    // TODO: add Index ptr
    // IndexPtr index_ = nullptr;
    std::string collection_name_;
    std::string schema_json_;
28
    SchemaPtr schema_;
29
};
30

31 32
using CollectionPtr = std::unique_ptr<Collection>;

33
}