Trying to query mysql database with sqljocky. This query works fine in phpmyadmin and return 5 rows with fine data. In Dart i got exception:
Class '_ResultsImpl' has no instance method 'forEach'.
I made breakpoint in query callback. Result object public filds are empty:
Ping function works well, so connection to base is established.
Even if i query simple "show tables" query, it returns to me empty Results instance with no data.
Query code below:
var pool = new ConnectionPool(
host: '127.0.0.1', port: 8889,
user: 'root', password: 'root',
db: 'lulzvideo', max: 5);
pool.query('select id, title from users')
.then((results) {
results.forEach((row) {
print('Name: ${row[0]}, email: ${row[1]}');
});
});