mysql1_dart
mysql1_dart copied to clipboard
there is the possibility to implement a mappedResultsQuery method just like in the postgres package
there is the possibility to implement a mappedResultsQuery method just like in the postgres package to return rows as maps containing table and column names:
https://pub.dev/packages/postgres
List<Map<String, Map<String, dynamic>>> results = await connection.mappedResultsQuery(
"SELECT t.id, t.name, u.name FROM t LEFT OUTER JOIN u ON t.id=u.t_id");
for (final row in results) {
var tID = row["t"]["id"];
var tName = row["t"]["name"];
var uName = row["u"]["name"];
}
Sounds reasonable. Will accept a PR adding this.