| 290 | } |
| 291 | |
| 292 | void Table::getRowAsString(libmexclass::proxy::method::Context& context) { |
| 293 | namespace mda = ::matlab::data; |
| 294 | using namespace libmexclass::proxy; |
| 295 | mda::ArrayFactory factory; |
| 296 | |
| 297 | mda::StructArray args = context.inputs[0]; |
| 298 | const mda::TypedArray<int64_t> index_mda = args[0]["Index"]; |
| 299 | const auto matlab_row_index = int64_t(index_mda[0]); |
| 300 | |
| 301 | MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT( |
| 302 | auto row_str_utf8, |
| 303 | arrow::matlab::tabular::get_row_as_string(table, matlab_row_index), context, |
| 304 | error::TABULAR_GET_ROW_AS_STRING_FAILED); |
| 305 | MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(auto row_str_utf16, |
| 306 | arrow::util::UTF8StringToUTF16(row_str_utf8), |
| 307 | context, error::UNICODE_CONVERSION_ERROR_ID); |
| 308 | context.outputs[0] = factory.createScalar(row_str_utf16); |
| 309 | } |
| 310 | |
| 311 | } // namespace arrow::matlab::tabular::proxy |
nothing calls this directly
no outgoing calls
no test coverage detected