Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 9a45e04

Browse files
authored
Update Example
1 parent 51506df commit 9a45e04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ import (
2323
)
2424

2525
func main() {
26+
// Stateless Query (ephemeral)
2627
result := chdb.Query("SELECT version()", "CSV")
2728
fmt.Println(result)
29+
30+
// Stateful Query (persistent)
31+
chdb.Session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'", "CSV", "/tmp")
32+
hello := chdb.Session("SELECT hello()", "CSV", "/tmp")
33+
fmt.Println(hello)
2834
}
2935
```
3036

0 commit comments

Comments
 (0)