Skip to content

Commit 3963b88

Browse files
committed
version check
1 parent b8da9f5 commit 3963b88

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/std/dynamic.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func DynamicExample() error {
3131
return err
3232
}
3333

34-
if !CheckMinServerVersion(conn, 24, 8, 0) {
34+
if !CheckMinServerVersion(conn, 25, 6, 0) {
3535
fmt.Print("unsupported clickhouse version for Dynamic type")
3636
return nil
3737
}
@@ -41,6 +41,11 @@ func DynamicExample() error {
4141
return err
4242
}
4343

44+
_, err = conn.ExecContext(ctx, "SET output_format_native_use_flattened_dynamic_and_json_serialization = 1")
45+
if err != nil {
46+
return err
47+
}
48+
4449
defer func() {
4550
conn.Exec("DROP TABLE go_dynamic_example")
4651
}()

0 commit comments

Comments
 (0)