e4378ddc530abc356c8ca4e3e6a317562b104c96,gb/graph.py,Graph,set_root,#Graph#Any#,25

Before Change



    def set_root(self, root):
        self.execute("UPDATE graph SET root=%s WHERE id=%s", (root.id, self.id))
        self.commit()

    def get_by_owner_and_name(self, owner, name):
        self.execute("SELECT id, root FROM graph WHERE owner=%s AND name=%s", (owner.id, name))
        row = self.cur.fetchone()

After Change


        return self

    def set_root(self, root):
        self._set_field("root", root.d["_id"])

    def get_by_owner_and_name(self, owner, name):
        self.d = self.db.nodes.find_one({"owner": owner.d["_id"], "label": name})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/graph.py
Class Name: Graph
Method Name: set_root


Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/user.py
Class Name: User
Method Name: create_session


Project Name: Pinafore/qb
Commit Name: 27b570b2caf65cc339124aa1c537f369e418082f
Time: 2015-09-10
Author: jordanbg@gmail.com
File Name: util/naqt.py
Class Name:
Method Name: