stablekernel / postgresql-dart

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.
https://www.dartdocs.org/documentation/postgres/latest
BSD 3-Clause "New" or "Revised" License
129 stars 32 forks source link

Stored procedures #138

Open luX0r-reload opened 4 years ago

luX0r-reload commented 4 years ago

Me and my team are developing a dart back-end and we need to call stored procedures and retrieve result recordsets with column names. It is possible with this driver?

Many thanks.

EDIT: It works.

final List<Map<String, dynamic>> results = await conn.mappedResultsQuery("SELECT * from get_user_by_id(@id)", substitutionValues: {"id": id});

Recordset is retrieved correctly, but appears as a child of table "null".