| 649 | } |
| 650 | |
| 651 | int32_t RowView::GetInteger(const int8_t* row, uint32_t idx, |
| 652 | ::fedb::type::DataType type, int64_t* val) { |
| 653 | int32_t ret = 0; |
| 654 | switch (type) { |
| 655 | case ::fedb::type::kSmallInt: { |
| 656 | int16_t tmp_val = 0; |
| 657 | ret = GetValue(row, idx, type, &tmp_val); |
| 658 | if (ret == 0) *val = tmp_val; |
| 659 | break; |
| 660 | } |
| 661 | case ::fedb::type::kInt: { |
| 662 | int32_t tmp_val = 0; |
| 663 | GetValue(row, idx, type, &tmp_val); |
| 664 | if (ret == 0) *val = tmp_val; |
| 665 | break; |
| 666 | } |
| 667 | case ::fedb::type::kTimestamp: |
| 668 | case ::fedb::type::kBigInt: { |
| 669 | int64_t tmp_val = 0; |
| 670 | GetValue(row, idx, type, &tmp_val); |
| 671 | if (ret == 0) *val = tmp_val; |
| 672 | break; |
| 673 | } |
| 674 | default: |
| 675 | return -1; |
| 676 | } |
| 677 | return ret; |
| 678 | } |
| 679 | |
| 680 | int32_t RowView::GetValue(const int8_t* row, uint32_t idx, |
| 681 | ::fedb::type::DataType type, void* val) { |
nothing calls this directly
no outgoing calls
no test coverage detected