| 142 | } |
| 143 | |
| 144 | void ZVecPyCollection::bind_db_methods( |
| 145 | py::class_<Collection, Collection::Ptr> &col) { |
| 146 | col.def_static("CreateAndOpen", |
| 147 | [](const std::string &path, const CollectionSchema &schema, |
| 148 | const CollectionOptions &options) { |
| 149 | Result<Collection::Ptr> result; |
| 150 | { |
| 151 | py::gil_scoped_release release; |
| 152 | result = Collection::CreateAndOpen(path, schema, options); |
| 153 | } |
| 154 | return unwrap_expected(result); |
| 155 | }) |
| 156 | .def_static("Open", [](const std::string &path, |
| 157 | const CollectionOptions &options) { |
| 158 | Result<Collection::Ptr> result; |
| 159 | { |
| 160 | py::gil_scoped_release release; |
| 161 | result = Collection::Open(path, options); |
| 162 | } |
| 163 | return unwrap_expected(result); |
| 164 | }); |
| 165 | } |
| 166 | |
| 167 | |
| 168 | void ZVecPyCollection::bind_ddl_methods( |
nothing calls this directly
no test coverage detected