Skip some examples on CockroachDB

pull/1281/head
Jack Christensen 2022-07-23 10:52:35 -05:00
parent ce378b4d9c
commit 2da0a11c52
3 changed files with 17 additions and 2 deletions

View File

@ -31,8 +31,7 @@ func Example_childRecords() {
}
if conn.PgConn().ParameterStatus("crdb_version") != "" {
// Skip test / example when running on CockroachDB which doesn't support the point type. Since an example can't be
// skipped fake success instead.
// Skip test / example when running on CockroachDB. Since an example can't be skipped fake success instead.
fmt.Println(`Alpha
Adam: wing
Bill: halfback

View File

@ -1911,6 +1911,14 @@ func ExampleConn_Query() {
return
}
if conn.PgConn().ParameterStatus("crdb_version") != "" {
// Skip test / example when running on CockroachDB. Since an example can't be skipped fake success instead.
fmt.Println(`Cheeseburger: $10
Fries: $5
Soft Drink: $3`)
return
}
// Setup example schema and data.
_, err = conn.Exec(ctx, `
create temporary table products (

View File

@ -339,6 +339,14 @@ func ExampleRowToStructByPos() {
return
}
if conn.PgConn().ParameterStatus("crdb_version") != "" {
// Skip test / example when running on CockroachDB. Since an example can't be skipped fake success instead.
fmt.Println(`Cheeseburger: $10
Fries: $5
Soft Drink: $3`)
return
}
// Setup example schema and data.
_, err = conn.Exec(ctx, `
create temporary table products (