MCPcopy
hub / github.com/PeerDB-io/peerdb / GeneratePostgresPeer

Function GeneratePostgresPeer

flow/e2e/pg.go:180–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

178}
179
180func GeneratePostgresPeer(t *testing.T) *protos.Peer {
181 t.Helper()
182 peer := &protos.Peer{
183 Name: "catalog",
184 Type: protos.DBType_POSTGRES,
185 Config: &protos.Peer_PostgresConfig{
186 PostgresConfig: internal.GetAncillaryPostgresConfigFromEnv(),
187 },
188 }
189 CreatePeer(t, peer)
190 return peer
191}
192
193func (s *PostgresSource) Exec(ctx context.Context, sql string, args ...any) error {
194 _, err := s.PostgresConnector.Conn().Exec(ctx, sql, args...)

Calls 1

CreatePeerFunction · 0.70