Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jaguar_query_sqljocky-2.2.4/adapter.dart - find(Find st) method returns wrong type #181

Open
Adenosperma1 opened this issue Mar 31, 2020 · 0 comments

Comments

@Adenosperma1
Copy link

Method: Future<List> find(Find st)
Error: A value of type 'StreamedResults' can't be assigned to a variable of type 'Results'.

Fix?:

Future<List> find(Find st) async {
String stStr = composeFind(st);

sj.StreamedResults streamedResults = await _connection.execute(stStr);

List<sj.Row> rows = await streamedResults.toList();
List<sj.Field> fields = streamedResults.fields;

var theKey, theValue;
var mapList = <Map>[];

for (var arow in rows) {
  var mapData = Map();
  for (int i = 0; i < fields.length; i++) {
    theKey = fields[i].name;
    theValue = arow[i];
    mapData[theKey] = theValue;
  }
  mapList.add(mapData);
}
return mapList;

}

@Adenosperma1 Adenosperma1 changed the title jaguar_query_sqljocky-2.2.4/adapter.dart, find(Find st) method returns wrong type jaguar_query_sqljocky-2.2.4/adapter.dart - find(Find st) method returns wrong type Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant