parameters: (self, query)
return_statement: return results
docstring: Submits the query to the database and returns tuples.
      Args:
        query SQL SELECT statement.
        db The database being queried.
      Returns:
        Results as list of lists (rows of fields).
docstring_summary: Submits the query to the database and returns tuples.
      Args:
        query SQL SELECT statement.
        db The database being queried.
      Returns:
        Results as list of lists (rows of fields).
docstring_tokens: Submits the query to the database and returns tuples . Args : query SQL SELECT statement . db The database being queried . Returns : Results as list of lists ( rows of fields ) .
function: def Query(self, query):
      """Submits the query to the database and returns tuples.
      Args:
        query SQL SELECT statement.
        db The database being queried.
      Returns:
        Results as list of lists (rows of fields).
      """
      command = (("psql -c \"%s\" -P format=unaligned -P tuples_only"
                 " -P fieldsep=\"%s\" %s")
                 % (query, self.separator_, self.database_))
      out = os.popen(command)
      results = []
      for line in out.readlines():
        row = line.strip().split(self.separator_)
        if len(row) == 1:
          results.append(row[0])
        else:
          results.append(row)
      out.close()
      return results
function_tokens: def Query ( self , query ) : command = ( ( "psql -c \"%s\" -P format=unaligned -P tuples_only" " -P fieldsep=\"%s\" %s" ) % ( query , self . separator_ , self . database_ ) ) out = os . popen ( command ) results = [ ] for line in out . readlines ( ) : row = line . strip ( ) . split ( self . separator_ ) if len ( row ) == 1 : results . append ( row [ 0 ] ) else : results . append ( row ) out . close ( ) return results