~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/db.py

  • Committer: William Grant
  • Date: 2009-01-20 01:44:20 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: grantw@unimelb.edu.au-20090120014420-t40ofmnvysps6ii9
ivle.database.ProjectSet: Add projects and project_groups referencesets.
www/apps/userservice: Don't use get_groups_by_projectset; construct the list
    of dicts manually.
ivle.db.get_groups_by_projectset: Remove. Unused. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
            return query
499
499
        return self.db.query(query).dictresult()
500
500
 
501
 
    def get_groups_by_projectset(self, projectsetid, dry=False):
502
 
        """Returns all the groups that are in a particular projectset"""
503
 
        query = """\
504
 
SELECT groupid, groupnm, nick, createdby, epoch
505
 
FROM project_group
506
 
WHERE project_group.projectsetid = %d;"""%projectsetid
507
 
        if dry:
508
 
            return query
509
 
        return self.db.query(query).dictresult()
510
 
 
511
501
    def close(self):
512
502
        """Close the DB connection. Do not call any other functions after
513
503
        this. (The behaviour of doing so is undefined).