def getLockStatsDB(self):
info_dict = {'<STR_LIT:all>': {},<EOL>'<STR_LIT>': {}}<EOL>cur = self._conn.cursor()<EOL>cur.execute("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>rows = cur.fetchall()<EOL>for (db, granted, cnt) in rows:<EOL><INDENT>info_dict['<STR_LIT:all>'][db] = info_dict['<STR_LIT:all>'].get(db, <NUM_LIT:0>) + cnt<EOL>if not granted:<EOL><INDENT>info_dict['<STR_LIT>'][db] = info_dict['<STR_LIT>'].get(db, <NUM_LIT:0>) + cnt<EOL><DEDENT><DEDENT>return info_dict<EOL>
Returns the number of active lock discriminated by database.

        @return: : Dictionary of stats.