bool OdbcHelper::CheckResult()

in src/util/odbc_helper.cc [37:53]


bool OdbcHelper::CheckResult(SQLRETURN rc, const std::string& log_message, SQLHANDLE handle, int32_t handle_type) {
    if (SQL_SUCCEEDED(rc)) {
        // Successfully fetched row.
        return true;
    }

    if (rc == SQL_NO_DATA) {
        // No more data to fetch.
        return false;
    }

    if (!log_message.empty()) {
        LogMessage(log_message, handle, handle_type);
    }
    
    return false;
}