| 71 | } |
| 72 | |
| 73 | void ZVecPyCollection::bind_db_methods( |
| 74 | py::class_<Collection, Collection::Ptr> &col) { |
| 75 | col.def_static("CreateAndOpen", |
| 76 | [](const std::string &path, const CollectionSchema &schema, |
| 77 | const CollectionOptions &options) { |
| 78 | Result<Collection::Ptr> result; |
| 79 | { |
| 80 | py::gil_scoped_release release; |
| 81 | result = Collection::CreateAndOpen(path, schema, options); |
| 82 | } |
| 83 | return unwrap_expected(result); |
| 84 | }) |
| 85 | .def_static("Open", [](const std::string &path, |
| 86 | const CollectionOptions &options) { |
| 87 | Result<Collection::Ptr> result; |
| 88 | { |
| 89 | py::gil_scoped_release release; |
| 90 | result = Collection::Open(path, options); |
| 91 | } |
| 92 | return unwrap_expected(result); |
| 93 | }); |
| 94 | } |
| 95 | |
| 96 | |
| 97 | void ZVecPyCollection::bind_ddl_methods( |
nothing calls this directly
no test coverage detected