+
+ /**
+ * Return the number of rows in the result
+ * Note that if you have perfomed an INSERT
+ * or UPDATE query or other query which will
+ * not return rows, this will return the
+ * number of affected rows, and SQLresult::Cols()
+ * will contain 0. In this case you SHOULD NEVER
+ * access any of the result set rows, as there arent any!
+ * @returns Number of rows in the result set.
+ */
+ virtual int Rows() = 0;
+
+ /**
+ * Return the number of columns in the result.
+ * If you performed an UPDATE or INSERT which
+ * does not return a dataset, this value will
+ * be 0.
+ * @returns Number of columns in the result set.
+ */
+ virtual int Cols() = 0;
+
+ /**
+ * Get a string name of the column by an index number
+ * @param column The id number of a column
+ * @returns The column name associated with the given ID
+ */
+ virtual std::string ColName(int column) = 0;
+
+ /**
+ * Get an index number for a column from a string name.
+ * An exception of type SQLbadColName will be thrown if
+ * the name given is invalid.
+ * @param column The column name to get the ID of
+ * @returns The ID number of the column provided
+ */
+ virtual int ColNum(const std::string &column) = 0;
+
+ /**
+ * Get a string value in a given row and column
+ * This does not effect the internal cursor.
+ * @returns The value stored at [row,column] in the table
+ */
+ virtual SQLfield GetValue(int row, int column) = 0;
+
+ /**
+ * Return a list of values in a row, this should
+ * increment an internal counter so you can repeatedly
+ * call it until it returns an empty vector.
+ * This returns a reference to an internal object,
+ * the same object is used for all calls to this function
+ * and therefore the return value is only valid until
+ * you call this function again. It is also invalid if
+ * the SQLresult object is destroyed.
+ * The internal cursor (row counter) is incremented by one.
+ * @returns A reference to the current row's SQLfieldList
+ */
+ virtual SQLfieldList& GetRow() = 0;
+
+ /**
+ * As above, but return a map indexed by key name.
+ * The internal cursor (row counter) is incremented by one.
+ * @returns A reference to the current row's SQLfieldMap
+ */
+ virtual SQLfieldMap& GetRowMap() = 0;
+
+ /**
+ * Like GetRow(), but returns a pointer to a dynamically
+ * allocated object which must be explicitly freed. For
+ * portability reasons this must be freed with SQLresult::Free()
+ * The internal cursor (row counter) is incremented by one.
+ * @returns A newly-allocated SQLfieldList
+ */
+ virtual SQLfieldList* GetRowPtr() = 0;
+
+ /**
+ * As above, but return a map indexed by key name
+ * The internal cursor (row counter) is incremented by one.
+ * @returns A newly-allocated SQLfieldMap
+ */
+ virtual SQLfieldMap* GetRowMapPtr() = 0;
+
+ /**
+ * Overloaded function for freeing the lists and maps
+ * returned by GetRowPtr or GetRowMapPtr.
+ * @param fm The SQLfieldMap to free
+ */
+ virtual void Free(SQLfieldMap* fm) = 0;
+
+ /**
+ * Overloaded function for freeing the lists and maps
+ * returned by GetRowPtr or GetRowMapPtr.
+ * @param fl The SQLfieldList to free
+ */
+ virtual void Free(SQLfieldList* fl) = 0;