MCPcopy Create free account
hub / github.com/apecloud/myduckserver / connect

Method connect

compatibility/pg/php/pg_test.php:26–33  ·  view source on GitHub ↗
($ip, $port, $user, $password)

Source from the content-addressed store, hash-verified

24 private $tests = [];
25
26 public function connect($ip, $port, $user, $password) {
27 try {
28 $url = "pgsql:host=$ip;port=$port;dbname=postgres";
29 $this->conn = new PDO($url, $user, $password);
30 } catch (PDOException $e) {
31 throw new RuntimeException($e->getMessage());
32 }
33 }
34
35 public function disconnect() {
36 $this->conn = null;

Callers 4

mainMethod · 0.45
pyarrow_test.pyFile · 0.45
psycopg_test.pyFile · 0.45
polars_test.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected