MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / currentDatabase

Function currentDatabase

plugins/destination/postgresql/client/client.go:166–173  ·  view source on GitHub ↗
(ctx context.Context, conn DBPool)

Source from the content-addressed store, hash-verified

164}
165
166func currentDatabase(ctx context.Context, conn DBPool) (string, error) {
167 var db string
168 err := conn.QueryRow(ctx, "select current_database()").Scan(&db)
169 if err != nil {
170 return "", err
171 }
172 return db, nil
173}
174
175func currentSchema(ctx context.Context, conn DBPool) (string, error) {
176 var schema string

Callers 2

NewFunction · 0.85
ConnectionTesterFunction · 0.85

Calls 2

ScanMethod · 0.80
QueryRowMethod · 0.65

Tested by

no test coverage detected