正在尝试使用sqljocky查询mysql数据库。这个查询在phpmyadmin中运行良好,返回5行数据。在Dart中,我得到了异常:
Class '_ResultsImpl' has no instance method 'forEach'.我在查询回调中设置了断点。结果对象公共文件为空:

Ping功能运行良好,因此建立了到base的连接。

即使我查询简单的"show tables“查询,它也会返回没有数据的空结果实例。
查询代码如下:
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]}');
});
});发布于 2014-10-15 23:11:11
result.listen((row) {
// Import into object
object.Import(row);https://stackoverflow.com/questions/26385945
复制相似问题