Пример использования: Код: const mysql2 = require('mysql2/promise'); class Parser { constructor() { this.defaultConf = { version: '0.1.5', results: { flat: [ ['name', 'name'], ] }, results_format: '$query: $name\\n', }; } async *parse(set, results) { const connection = await mysql2.createConnection({ host: 'ensembldb.ensembl.org', port: '5306', user: 'anonymous', password: '', database: 'homo_sapiens_variation_80_38' }); const [rows, fields] = await connection.query( 'SELECT * FROM variation LIMIT 10' ); results.name = rows[0].name; results.success = 1; return results; } }