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

Method Connect

compatibility/pg/csharp/PGTest.cs:15–29  ·  view source on GitHub ↗
(string ip, int port, string user, string password)

Source from the content-addressed store, hash-verified

13 private List<Test> tests = new List<Test>();
14
15 public void Connect(string ip, int port, string user, string password)
16 {
17 string connectionString = $"Host={ip};Port={port};Username={user};Password={password};Database=postgres;Timeout=300;CommandTimeout=600;";
18 try
19 {
20 conn = new NpgsqlConnection(connectionString);
21 conn.Open();
22 cmd = conn.CreateCommand();
23 cmd.CommandType = CommandType.Text;
24 }
25 catch (NpgsqlException e)
26 {
27 throw new Exception($"Error connecting to database: {e.Message}", e);
28 }
29 }
30
31 public void Disconnect()
32 {

Callers 15

CreateTestServerFunction · 0.45
detectVersionAndGTIDModeFunction · 0.45
MainMethod · 0.45
TestCreateCatalogFunction · 0.45
TestFuncReplacementFunction · 0.45
TestSessParamFunction · 0.45
CaughtUpMethod · 0.45
beginReplicationMethod · 0.45
DropPublicationFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected