| 440 | } |
| 441 | |
| 442 | int64_t Row::ReadData(int columnIndex, void* buffer, int64_t maxSize) const |
| 443 | { |
| 444 | const auto* data = sqlite3_column_blob(*mStatement, columnIndex); |
| 445 | |
| 446 | if (data == nullptr) |
| 447 | return 0; |
| 448 | |
| 449 | const auto size = std::min(maxSize, GetColumnBytes(columnIndex)); |
| 450 | |
| 451 | std::memcpy(buffer, data, size); |
| 452 | |
| 453 | return size; |
| 454 | } |
| 455 | |
| 456 | } // namespace audacity::sqlite |