jaguar_orm icon indicating copy to clipboard operation
jaguar_orm copied to clipboard

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

Open Adenosperma1 opened this issue 4 years ago • 0 comments

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<Results> destream(StreamedResults r) async { var rows = await r.toList(); return Results(rows, r.fields, r.insertId, r.affectedRows); }

Adenosperma1 avatar Mar 31 '20 06:03 Adenosperma1