|
| 1 | +<!-- Code generated by gomarkdoc. DO NOT EDIT --> |
| 2 | + |
| 3 | +# chdb |
| 4 | + |
| 5 | +```go |
| 6 | +import "github.com/chdb-io/chdb-go/chdb" |
| 7 | +``` |
| 8 | + |
| 9 | +## Index |
| 10 | + |
| 11 | +- [func Query\(queryStr string, outputFormats ...string\) \*chdbstable.LocalResult](<#Query>) |
| 12 | +- [type Session](<#Session>) |
| 13 | + - [func NewSession\(paths ...string\) \(\*Session, error\)](<#NewSession>) |
| 14 | + - [func \(s \*Session\) Cleanup\(\)](<#Session.Cleanup>) |
| 15 | + - [func \(s \*Session\) Close\(\)](<#Session.Close>) |
| 16 | + - [func \(s \*Session\) IsTemp\(\) bool](<#Session.IsTemp>) |
| 17 | + - [func \(s \*Session\) Path\(\) string](<#Session.Path>) |
| 18 | + - [func \(s \*Session\) Query\(queryStr string, outputFormats ...string\) \*chdbstable.LocalResult](<#Session.Query>) |
| 19 | + |
| 20 | + |
| 21 | +<a name="Query"></a> |
| 22 | +## func [Query](<https://github.com/chdb-io/chdb-go/blob/main/chdb/wrapper.go#L8>) |
| 23 | + |
| 24 | +```go |
| 25 | +func Query(queryStr string, outputFormats ...string) *chdbstable.LocalResult |
| 26 | +``` |
| 27 | + |
| 28 | +Query calls queryToBuffer with a default output format of "CSV" if not provided. |
| 29 | + |
| 30 | +<a name="Session"></a> |
| 31 | +## type [Session](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L11-L14>) |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +```go |
| 36 | +type Session struct { |
| 37 | + // contains filtered or unexported fields |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +<a name="NewSession"></a> |
| 42 | +### func [NewSession](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L19>) |
| 43 | + |
| 44 | +```go |
| 45 | +func NewSession(paths ...string) (*Session, error) |
| 46 | +``` |
| 47 | + |
| 48 | +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. |
| 49 | + |
| 50 | +<a name="Session.Cleanup"></a> |
| 51 | +### func \(\*Session\) [Cleanup](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L57>) |
| 52 | + |
| 53 | +```go |
| 54 | +func (s *Session) Cleanup() |
| 55 | +``` |
| 56 | + |
| 57 | +Cleanup closes the session and removes the directory. |
| 58 | + |
| 59 | +<a name="Session.Close"></a> |
| 60 | +### func \(\*Session\) [Close](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L49>) |
| 61 | + |
| 62 | +```go |
| 63 | +func (s *Session) Close() |
| 64 | +``` |
| 65 | + |
| 66 | +Close closes the session and removes the temporary directory |
| 67 | + |
| 68 | +``` |
| 69 | +temporary directory is created when NewSession was called with an empty path. |
| 70 | +``` |
| 71 | + |
| 72 | +<a name="Session.IsTemp"></a> |
| 73 | +### func \(\*Session\) [IsTemp](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L68>) |
| 74 | + |
| 75 | +```go |
| 76 | +func (s *Session) IsTemp() bool |
| 77 | +``` |
| 78 | + |
| 79 | +IsTemp returns whether the session is temporary. |
| 80 | + |
| 81 | +<a name="Session.Path"></a> |
| 82 | +### func \(\*Session\) [Path](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L63>) |
| 83 | + |
| 84 | +```go |
| 85 | +func (s *Session) Path() string |
| 86 | +``` |
| 87 | + |
| 88 | +Path returns the path of the session. |
| 89 | + |
| 90 | +<a name="Session.Query"></a> |
| 91 | +### func \(\*Session\) [Query](<https://github.com/chdb-io/chdb-go/blob/main/chdb/session.go#L39>) |
| 92 | + |
| 93 | +```go |
| 94 | +func (s *Session) Query(queryStr string, outputFormats ...string) *chdbstable.LocalResult |
| 95 | +``` |
| 96 | + |
| 97 | +Query calls queryToBuffer with a default output format of "CSV" if not provided. |
| 98 | + |
| 99 | +Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>) |
0 commit comments