| 220 | } |
| 221 | |
| 222 | void RecordBatch::getRowAsString(libmexclass::proxy::method::Context& context) { |
| 223 | namespace mda = ::matlab::data; |
| 224 | using namespace libmexclass::proxy; |
| 225 | mda::ArrayFactory factory; |
| 226 | |
| 227 | mda::StructArray args = context.inputs[0]; |
| 228 | const mda::TypedArray<int64_t> index_mda = args[0]["Index"]; |
| 229 | const auto matlab_row_index = int64_t(index_mda[0]); |
| 230 | |
| 231 | MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT( |
| 232 | auto row_str_utf8, |
| 233 | arrow::matlab::tabular::get_row_as_string(record_batch, matlab_row_index), context, |
| 234 | error::TABULAR_GET_ROW_AS_STRING_FAILED); |
| 235 | MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(auto row_str_utf16, |
| 236 | arrow::util::UTF8StringToUTF16(row_str_utf8), |
| 237 | context, error::UNICODE_CONVERSION_ERROR_ID); |
| 238 | context.outputs[0] = factory.createScalar(row_str_utf16); |
| 239 | } |
| 240 | |
| 241 | void RecordBatch::exportToC(libmexclass::proxy::method::Context& context) { |
| 242 | namespace mda = ::matlab::data; |
nothing calls this directly
no outgoing calls
no test coverage detected