#include "stdafx.h" #include #include namespace mssql { bool ReadNextResultOperation::TryInvokeOdbc() { if (!_statement) return false; preRowCount = _statement->get_row_count(); const auto res = _statement->try_read_next_result(); postRowCount = _statement->get_row_count(); return res; } Local ReadNextResultOperation::CreateCompletionArg() { const auto more_meta = Nan::New(); Nan::Set(more_meta, Nan::New("endOfResults").ToLocalChecked(), _statement->handle_end_of_results()); Nan::Set(more_meta, Nan::New("endOfRows").ToLocalChecked(), _statement->end_of_rows()); Nan::Set(more_meta, Nan::New("meta").ToLocalChecked(), _statement->get_meta_value()); Nan::Set(more_meta, Nan::New("preRowCount").ToLocalChecked(), Nan::New(static_cast(preRowCount))); Nan::Set(more_meta, Nan::New("rowCount").ToLocalChecked(), Nan::New(static_cast(postRowCount))); return more_meta; } }