mirror of https://github.com/jackc/pgx.git
Skip some examples on CockroachDB
parent
ce378b4d9c
commit
2da0a11c52
|
@ -31,8 +31,7 @@ func Example_childRecords() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
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
|
// Skip test / example when running on CockroachDB. Since an example can't be skipped fake success instead.
|
||||||
// skipped fake success instead.
|
|
||||||
fmt.Println(`Alpha
|
fmt.Println(`Alpha
|
||||||
Adam: wing
|
Adam: wing
|
||||||
Bill: halfback
|
Bill: halfback
|
||||||
|
|
|
@ -1911,6 +1911,14 @@ func ExampleConn_Query() {
|
||||||
return
|
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.
|
// Setup example schema and data.
|
||||||
_, err = conn.Exec(ctx, `
|
_, err = conn.Exec(ctx, `
|
||||||
create temporary table products (
|
create temporary table products (
|
||||||
|
|
|
@ -339,6 +339,14 @@ func ExampleRowToStructByPos() {
|
||||||
return
|
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.
|
// Setup example schema and data.
|
||||||
_, err = conn.Exec(ctx, `
|
_, err = conn.Exec(ctx, `
|
||||||
create temporary table products (
|
create temporary table products (
|
||||||
|
|
Loading…
Reference in New Issue