forked from xxgreg/dart_postgresql
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Hello, sorry for my question.
I'm trying to get the return of the function below, which should return a List with the result of the select and return is null.
Can you help me please.
See function:
queryExec(String tipo, String sql, List param, List valparam) async {
List wret;
connect(uri).then((conn) {
switch (tipo.toUpperCase()) {
case 'SELECT':
{
conn
.query(sql, {param: valparam})
.toList()
.then((result) {
wret = result;
return wret;
})
.then((_) => conn.close())
.catchError((err) => print('Query ERRO: $err'));
break;
}
}
});
// return wret;
}
Metadata
Metadata
Assignees
Labels
No labels