docs: def get_scalar(self, cursor, index=0):
      """Returns a single value from the first returned record from a cursor.
  
      By default it will get cursor.fecthone()[0] which works with tuples and namedtuples. For dict
      cursor it is necessary to specify index. This method will not work with cursors that aren't
      indexable.
  
      :param cursor: a cursor object
      :param index: the index of the cursor to return the value from
      """
      if isinstance(index, int):
        return cursor.fetchone()[index]
      else:
        return get_value(cursor.fetchone(), index)