Jaguar-dart / jaguar_orm

Source-generated ORM with relations (one-to-one, one-to-many, many-to-many), preloading, cascading, polymorphic relations, etc
https://jaguar-dart.github.io
BSD 3-Clause "New" or "Revised" License
217 stars 54 forks source link

jaguar_query_sqljocky-2.2.4/adapter.dart - 'StreamedResults' can't be assigned to type Results #179

Open Adenosperma1 opened 4 years ago

Adenosperma1 commented 4 years ago

File: jaguar_query_sqljocky-2.2.4/lib/src/adapter.dart

Error: A value of type 'StreamedResults' can't be assigned to a variable of type 'Results'.

Fix: Need to destream before setting to results

Find all occurances in adapter of this line : sj.Results results = await _connection.execute(stStr);

Replace with this:: sj.Results results = await destream(await _connection.execute(stStr));;

Using this method to destream. Future destream(StreamedResults r) async { var rows = await r.toList(); return Results(rows, r.fields, r.insertId, r.affectedRows); }