6279a1e15c55b651bb5669546483a6c551552c6b,dino/db/rdbms/handler.py,DatabaseRdbms,delete_acl,#DatabaseRdbms#Any#Any#,444

Before Change



    @with_session
    def delete_acl(self, room_id: str, acl_type: str) -> None:
        raise NotImplementedError()

    @with_session
    def add_acls(self, room_id: str, acls: dict) -> None:
        raise NotImplementedError()

After Change


    def delete_acl(self, room_id: str, acl_type: str) -> None:
        room = self.session.query(Rooms).filter(Rooms.uuid == room_id).first()
        if room is None:
            raise NoSuchRoomException(room_id)

        found_acl = self.session.query(Acls).join(Acls.room).filter(Rooms.uuid == room_id).first()
        if found_acl is None:
            return

        found_acl.__setattr__(acl_type, None)
        self.session.commit()

    @with_session
    def add_acls(self, room_id: str, acls: dict) -> None:
        if acls is None or len(acls) == 0:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: thenetcircle/dino
Commit Name: 6279a1e15c55b651bb5669546483a6c551552c6b
Time: 2016-10-19
Author: oscar.eriks@gmail.com
File Name: dino/db/rdbms/handler.py
Class Name: DatabaseRdbms
Method Name: delete_acl


Project Name: mlflow/mlflow
Commit Name: a7272b7309b6d53e70afe7c19dc3ca383962261a
Time: 2019-03-13
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_metric


Project Name: thenetcircle/dino
Commit Name: 557aef062fd907e6dec11acfa5525d2d859d29a7
Time: 2016-10-19
Author: oscar.eriks@gmail.com
File Name: dino/db/rdbms/handler.py
Class Name: DatabaseRdbms
Method Name: leave_room


Project Name: mlflow/mlflow
Commit Name: a7272b7309b6d53e70afe7c19dc3ca383962261a
Time: 2019-03-13
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_param