You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NewSession creates a new session with the given path. If path is empty, a temporary directory is created. Note: The temporary directory is removed when Close is called.
QueryStream calls \`query\_conn\` function with the current connection and a default output format of "CSV" if not provided. The result is a stream of data that can be read in chunks. This is useful for large datasets that cannot be loaded into memory all at once.
128
+
109
129
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
Session will keep the state of query. If path is None, it will create a temporary directory and use it as the database path and the temporary directory will be removed when the session is closed. You can also pass in a path to create a database at that path where will keep your data.
45
+
NewConnection is the low level function to create a new connection to the chdb server. using NewConnectionFromConnString is recommended.
41
46
42
-
You can also use a connection string to pass in the path and other parameters. Examples:
47
+
Deprecated: Use NewConnectionFromConnString instead. This function will be removed in a future version.
48
+
49
+
Session will keep the state of query. If path is None, it will create a temporary directory and use it as the database path and the temporary directory will be removed when the session is closed. You can also pass in a path to create a database at that path where will keep your data. This is a thin wrapper around the connect\_chdb C API. the argc and argv should be like:
NewConnectionFromConnString creates a new connection to the chdb server using a connection string. You can use a connection string to pass in the path and other parameters. Examples:
43
68
44
69
- ":memory:" \(for in\-memory database\)
45
70
- "test.db" \(for relative path\)
@@ -67,13 +92,12 @@ Important:
67
92
- Creating a new session will close the existing one.
68
93
69
94
<a name="ChdbResult"></a>
70
-
## type [ChdbResult](<https://github.com/chdb-io/chdb-go/blob/main/chdb-purego/types.go#L34-L51>)
95
+
## type [ChdbResult](<https://github.com/s0und0fs1lence/chdb-go/blob/main/chdb-purego/types.go#L39-L55>)
71
96
72
97
73
98
74
99
```go
75
100
type ChdbResult interface {
76
-
// Raw bytes result buffer, used for reading the result of clickhouse query
77
101
Buf() []byte
78
102
// String rapresentation of the the buffer
79
103
String() string
@@ -88,17 +112,28 @@ type ChdbResult interface {
88
112
// If the query had any error during execution, here you can retrieve the cause.
89
113
Error() error
90
114
// Free the query result and all the allocated memory
0 commit comments