@with_formatter(format_names)<EOL><INDENT>def query_names(self, name, like, kind):<DEDENT>
kind = self._make_kind_id(kind)<EOL>sql = '<STR_LIT>''<STR_LIT>'.format('<STR_LIT>' if like else '<STR_LIT:=>')<EOL>args = (name,)<EOL>if like:<EOL><INDENT>sql += '<STR_LIT>'<EOL>args = (name, '<STR_LIT:\\>')<EOL><DEDENT>logging.debug('<STR_LIT>', sql, args)<EOL>self.cursor.execute(sql, args)<EOL>ids = self.cursor.fetchall()<EOL>files = []<EOL>for file_id, header in ids:<EOL><INDENT>sql = '<STR_LIT>''<STR_LIT>'<EOL>args = (file_id,)<EOL>if kind:<EOL><INDENT>sql += '<STR_LIT>'<EOL>args = (file_id, kind)<EOL><DEDENT>logging.debug('<STR_LIT>', sql, args)<EOL>self.cursor.execute(sql, args)<EOL>files.append((header, self.cursor.fetchall()))<EOL><DEDENT>return files<EOL>
Query function declarations in the files.