run method

Future<PgResult> run(
  1. Object? parameters, {
  2. Duration? timeout,
})

Implementation

Future<PgResult> run(
  Object? /* List<Object?|PgTypedParameter> | Map<String, Object?|PgTypedParameter> */ parameters, {
  Duration? timeout,
}) async {
  final items = <PgResultRow>[];
  final subscription = bind(parameters).listen(items.add);
  await subscription.asFuture();
  await subscription.cancel();

  return PgResult(
      items, await subscription.affectedRows, await subscription.schema);
}