Skip to content

there is the possibility to implement a mappedResultsQuery method just like in the postgres package #40

@insinfo

Description

@insinfo

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"];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions