ark::database::DatabaseRow

Defined in header “ark/database/row.hh”.


A database row for s result, meant to allow access into a particular row being returned from a database connection.

Methods

  • DatabaseRow(std::vector< const char * > values)
    Constructor. Initializes from the supplied list of values.

  • const char * operator[](size_t index)
    Returns the raw text pointed to at the given index. The column indexes start at zero.

  • size_t size()
    Returns the number of columns in this row.

  • bool empty()
    Returns true if these results are empty (and you should stop iterating) or false otherwise.

  • bool is_column_null(size_t index)
    Returns true if the given column is NULL or not.

  • operator bool()
    Returns if this row is valid or not.

  • Type value_as(size_t index)
    Returns the value at the given row index (starting at zero) and converts it into the specified type.