예제 #1
0
    def GetColumns(self, fields, table='', join='', **kwargs):
        """ gets a set of data from a table

      **Arguments**

       - fields: a string with the names of the fields to be extracted,
         this should be a comma delimited list

      **Returns**

          a list of the data

      **Notes**

        - this uses _DbUtils.GetColumns_

    """
        if not table:
            table = self.tableName
        return DbUtils.GetColumns(self.dbName,
                                  table,
                                  fields,
                                  self.user,
                                  self.password,
                                  join=join)
예제 #2
0
 def test_GetColumns(self):
     d = DbUtils.GetColumns(self.dbName, 'ten_elements', 'val')
     self.assertEqual(len(d), 10)