connect method

Future<Process> connect({
  1. required String user,
  2. required String database,
  3. String? host,
  4. int? port,
  5. String? password,
  6. bool inheritStdio = false,
})

Implementation

Future<Process> connect({
  required String user,
  required String database,
  String? host,
  int? port,
  String? password,
  bool inheritStdio = false,
}) {
  return startProcess(
    [
      if (null != host) "--host=$host",
      if (null != port) "--port=$port",
      "--user=$user",
      if (null != password) "--password=$password",
      database,
    ],
    mode: inheritStdio
        ? ProcessStartMode.inheritStdio
        : ProcessStartMode.normal,
  );
}