- @override
Executes an arbitrary command.
Source
@override Future<dynamic> execute(String sql, {Map<String, dynamic> substitutionValues}) async { var now = new DateTime.now().toUtc(); var dbConnection = await getDatabaseConnection(); try { var rows = await dbConnection.query(sql, substitutionValues: substitutionValues); var mappedRows = rows.map((row) => row.toList()).toList(); logger.finest(() => "Query:execute (${(new DateTime.now().toUtc().difference(now).inMilliseconds)}ms) $sql -> $mappedRows"); return mappedRows; } on PostgreSQLException catch (e) { throw _interpretException(e); } }