@@ -225,18 +225,21 @@ static inline void register_batch_inserter(Module & m)
225225{
226226 namespace py = pybind11;
227227
228- py::class_<qdb::batch_inserter>{m, " TimeSeriesBatch" } //
229- .def (py::init<qdb::handle_ptr, const std::vector<batch_column_info> &>()) //
228+ py::class_<qdb::batch_inserter>{m, " TimeSeriesBatch" }
229+ .def (py::init ([](py::args, py::kwargs) {
230+ throw qdb::direct_instantiation_exception{" conn.ts_batch(...)" };
231+ return nullptr ;
232+ }))
230233 .def (" start_row" , &qdb::batch_inserter::start_row,
231- " Calling this function marks the beginning of processing a new row." ) //
232- .def (" set_blob" , &qdb::batch_inserter::set_blob) //
233- .def (" set_string" , &qdb::batch_inserter::set_string) //
234- .def (" set_double" , &qdb::batch_inserter::set_double) //
235- .def (" set_int64" , &qdb::batch_inserter::set_int64) //
236- .def (" set_timestamp" , &qdb::batch_inserter::set_timestamp) //
237- .def (" push" , &qdb::batch_inserter::push, " Regular batch push" ) //
234+ " Calling this function marks the beginning of processing a new row." )
235+ .def (" set_blob" , &qdb::batch_inserter::set_blob)
236+ .def (" set_string" , &qdb::batch_inserter::set_string)
237+ .def (" set_double" , &qdb::batch_inserter::set_double)
238+ .def (" set_int64" , &qdb::batch_inserter::set_int64)
239+ .def (" set_timestamp" , &qdb::batch_inserter::set_timestamp)
240+ .def (" push" , &qdb::batch_inserter::push, " Regular batch push" )
238241 .def (" push_async" , &qdb::batch_inserter::push_async,
239- " Asynchronous batch push that buffers data inside the QuasarDB daemon" ) //
242+ " Asynchronous batch push that buffers data inside the QuasarDB daemon" )
240243 .def (" push_fast" , &qdb::batch_inserter::push_fast,
241244 " Fast, in-place batch push that is efficient when doing lots of small, incremental pushes." )
242245 .def (" push_truncate" , &qdb::batch_inserter::push_truncate,
0 commit comments