MCPcopy
hub / github.com/jackc/pgx / skipCockroachDB

Function skipCockroachDB

stdlib/sql_test.go:42–55  ·  view source on GitHub ↗
(t testing.TB, db *sql.DB, msg string)

Source from the content-addressed store, hash-verified

40}
41
42func skipCockroachDB(t testing.TB, db *sql.DB, msg string) {
43 conn, err := db.Conn(context.Background())
44 require.NoError(t, err)
45 defer conn.Close()
46
47 err = conn.Raw(func(driverConn any) error {
48 conn := driverConn.(*stdlib.Conn).Conn()
49 if conn.PgConn().ParameterStatus("crdb_version") != "" {
50 t.Skip(msg)
51 }
52 return nil
53 })
54 require.NoError(t, err)
55}
56
57func skipPostgreSQLVersionLessThan(t testing.TB, db *sql.DB, minVersion int64) {
58 conn, err := db.Conn(context.Background())

Callers 15

TestNormalLifeCycleFunction · 0.70
TestQueryCloseRowsEarlyFunction · 0.70
TestConnQueryFunction · 0.70
TestConnQueryScanRangeFunction · 0.70
TestConnBeginTxIsolationFunction · 0.70
TestBeginTxContextCancelFunction · 0.70
TestQueryLifeCycleFunction · 0.70

Calls 4

ParameterStatusMethod · 0.80
PgConnMethod · 0.80
ConnMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected