MCPcopy Create free account
hub / github.com/alibaba/zvec / bind_db_methods

Method bind_db_methods

src/binding/python/model/python_collection.cc:144–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void 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
168void ZVecPyCollection::bind_ddl_methods(

Callers

nothing calls this directly

Calls 1

unwrap_expectedFunction · 0.85

Tested by

no test coverage detected