From: Mark Huang Date: Wed, 8 Nov 2006 22:08:09 +0000 (+0000) Subject: - rename fill to selectall X-Git-Tag: pycurl-7_13_1~363 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=fdb3ec4213e640ae67c36c24f4c5ec3547662d61;p=plcapi.git - rename fill to selectall --- diff --git a/PLC/Table.py b/PLC/Table.py index 68873b47..ae526b58 100644 --- a/PLC/Table.py +++ b/PLC/Table.py @@ -135,12 +135,12 @@ class Table(dict): for row in self.values(): row.sync(commit) - def fill(self, rows): + def selectall(self, sql, params = None): """ Given a list of rows from the database, fill ourselves with Row objects keyed on the primary key defined by the Row class we were initialized with. """ - for row in rows: + for row in self.api.db.selectall(sql, params): self[row[self.row.primary_key]] = self.row(self.api, row)