| 1866 | } |
| 1867 | |
| 1868 | bool Statement::fetch(thread_db* tdbb, const ValueListNode* out_params) |
| 1869 | { |
| 1870 | fb_assert(isAllocated() && m_stmt_selectable); |
| 1871 | fb_assert(!m_error); |
| 1872 | fb_assert(m_active); |
| 1873 | |
| 1874 | if (!doFetch(tdbb)) |
| 1875 | return false; |
| 1876 | |
| 1877 | m_fetched = true; |
| 1878 | |
| 1879 | getOutParams(tdbb, out_params); |
| 1880 | |
| 1881 | if (m_singleton) |
| 1882 | { |
| 1883 | if (doFetch(tdbb)) |
| 1884 | { |
| 1885 | FbLocalStatus status; |
| 1886 | Arg::Gds(isc_sing_select_err).copyTo(&status); |
| 1887 | raise(&status, tdbb, "isc_dsql_fetch"); |
| 1888 | } |
| 1889 | return false; |
| 1890 | } |
| 1891 | |
| 1892 | return true; |
| 1893 | } |
| 1894 | |
| 1895 | void Statement::close(thread_db* tdbb, bool invalidTran) |
| 1896 | { |