Example #1
0
inline bool command::fetch(std::vector<variant>& row)
{
  if (!m_stmt) return false;
  if (m_cols.empty()) columns();

  const int r(lib::singleton().p_mysql_stmt_fetch(m_stmt));
  if (MYSQL_NO_DATA == r) return false;
  check(1 != r);

  row.resize(m_cols.size());
  for (size_t i(0); i < m_cols.size(); ++i)
    check(m_cols[i](m_stmt, (unsigned int)i, row[i]) == 0);
  return true;
}
Example #2
0
inline bool command::fetch(std::vector<variant>& row)
{
  if (0 == m_hnd.stmt) return false;
  if (m_cols.empty()) columns();

  const sword r(lib::singleton().p_OCIStmtFetch2(m_hnd.stmt, m_hnd.err, 1, OCI_FETCH_NEXT, 1, OCI_DEFAULT));
  if (OCI_NO_DATA == r) return false;
  m_hnd.check(r);

  row.resize(m_cols.size());
  for (size_t i(0); i < m_cols.size(); ++i)
    m_cols[i](row[i]);
  return true;
}
Example #3
0
inline bool command::fetch(std::vector<variant>& row)
{
  if (lib::error(m_req)) return false;
  if (m_cols.empty()) columns();

  const int r(lib::singleton().p_cci_cursor(m_req, 1, CCI_CURSOR_CURRENT, &m_err));
  if (CCI_ER_NO_MORE_DATA == r) return false;
  check(r);
  check(lib::singleton().p_cci_fetch(m_req, &m_err));

  row.resize(m_cols.size());
  for (size_t i(0); i < m_cols.size(); ++i)
    if (lib::error(m_cols[i](m_req, i, row[i]))) throw std::runtime_error("CUBRID error");
  return true;
}
Example #4
0
void AssDialogue::UpdateText(boost::ptr_vector<AssDialogueBlock>& blocks) {
	if (blocks.empty()) return;
	Text = join(blocks | transformed(get_text), "");
}